Commit 948ba312 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate off base::ThreadPool()-as-a-trait in /chrome/browser/chromeos/input_method

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.

TBR=zork@chromium.org

Bug: 1026641
Change-Id: Iafe58f29c0498309daa27c6df138b99437ac0c31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079084Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745935}
parent afcbebc5
...@@ -177,11 +177,10 @@ void ComponentExtensionIMEManagerImpl::Load(Profile* profile, ...@@ -177,11 +177,10 @@ void ComponentExtensionIMEManagerImpl::Load(Profile* profile,
// and InputMethodEngine creation, so that the virtual keyboard web content // and InputMethodEngine creation, so that the virtual keyboard web content
// url won't be override by IME component extensions. // url won't be override by IME component extensions.
auto* copied_file_path = new base::FilePath(file_path); auto* copied_file_path = new base::FilePath(file_path);
base::PostTaskAndReplyWithResult( base::ThreadPool::PostTaskAndReplyWithResult(
// USER_BLOCKING because it is on the critical path of displaying the // USER_BLOCKING because it is on the critical path of displaying the
// virtual keyboard. See https://crbug.com/976542 // virtual keyboard. See https://crbug.com/976542
FROM_HERE, FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_BLOCKING},
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_BLOCKING},
base::BindOnce(&CheckFilePath, base::Unretained(copied_file_path)), base::BindOnce(&CheckFilePath, base::Unretained(copied_file_path)),
base::BindOnce(&OnFilePathChecked, base::Unretained(profile), base::BindOnce(&OnFilePathChecked, base::Unretained(profile),
base::Owned(new std::string(extension_id)), base::Owned(new std::string(extension_id)),
......
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