Commit d36f366b authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate off base::ThreadPool()-as-a-trait in /chrome/browser/safe_browsing/chrome_cleaner

This CL is a logical no-op.

It manually covers the use cases the script
(https://crbug.com/1026641#c22) didn't cover in
https://chromium-review.googlesource.com/c/chromium/src/+/2026350.

A few of the affected files were also migrated to
content::GetUIThreadTaskRunner() whenever surrounding code consistency
was at stake (but the bulk of that migration is staged to happen after
this one so this wasn't a priority in this batch).

Most files intentionally kept base/task/post_task.h as an include. It is
still required because of a cyclical dependency during the migration
preventing base/task/thread_pool.h from implicitly providing
base/task/task_traits.h to its users (callers that explicitly store
TaskTraits and include task_traits.h don't have this problem). The
post_task.h include will be cleaned up in a later phase.

This CL was uploaded by git cl split.

R=proberge@chromium.org

Bug: 1026641
Change-Id: I16138ae911bc05fa34eec4bed07eef11eb1ee74c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078427
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarproberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745479}
parent d95c1de3
......@@ -69,11 +69,11 @@ void ChromeCleanerRunner::RunChromeCleanerAndReplyWithExitCode(
base::Unretained(extension_registry));
auto process_done =
base::BindOnce(&ChromeCleanerRunner::OnProcessDone, cleaner_runner);
base::PostTaskAndReplyWithResult(
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE,
// LaunchAndWaitForExitOnBackgroundThread creates (MayBlock()) and joins
// (WithBaseSyncPrimitives()) a process.
{base::ThreadPool(), base::MayBlock(), base::WithBaseSyncPrimitives(),
{base::MayBlock(), base::WithBaseSyncPrimitives(),
base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
std::move(launch_and_wait), std::move(process_done));
......
......@@ -951,10 +951,10 @@ class ReporterRunner {
static ReporterRunner* instance_;
scoped_refptr<base::TaskRunner> blocking_task_runner_ =
base::CreateTaskRunner(
base::ThreadPool::CreateTaskRunner(
// LaunchAndWaitForExit creates (MayBlock()) and joins
// (WithBaseSyncPrimitives()) a process.
{base::ThreadPool(), base::MayBlock(), base::WithBaseSyncPrimitives(),
{base::MayBlock(), base::WithBaseSyncPrimitives(),
base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment