Skip to content

Commit

Permalink
Use TaskScheduler instead of blocking pool in platform_util.cc.
Browse files Browse the repository at this point in the history
The blocking pool is being deprecated in favor of TaskScheduler.

BUG=667892
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2677943002
Cr-Commit-Position: refs/heads/master@{#448632}
  • Loading branch information
fdoray authored and Commit bot committed Feb 7, 2017
1 parent 9e39f46 commit 46e31b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions chrome/browser/platform_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/task_scheduler/post_task.h"
#include "chrome/browser/platform_util_internal.h"
#include "content/public/browser/browser_thread.h"

Expand Down Expand Up @@ -57,9 +58,11 @@ void OpenItem(Profile* profile,
OpenItemType item_type,
const OpenOperationCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostBlockingPoolTask(
FROM_HERE, base::Bind(&VerifyAndOpenItemOnBlockingThread, full_path,
item_type, callback));
base::PostTaskWithTraits(FROM_HERE,
base::TaskTraits().MayBlock().WithPriority(
base::TaskPriority::BACKGROUND),
base::Bind(&VerifyAndOpenItemOnBlockingThread,
full_path, item_type, callback));
}

} // namespace platform_util

0 comments on commit 46e31b5

Please sign in to comment.