Commit 04c52ffa authored by François Doray's avatar François Doray Committed by Commit Bot

[threadpool] Set IME task required for official keyboard on ChromeOS as USER_BLOCKING.

This is a required step to make the official keyboard work without
BEST_EFFORT tasks.

BEST_EFFORT tasks can be arbitrarily delayed. They should not be on
the critical path of behavior the user is actively waiting on.

Bug: 976542
Change-Id: I9a0207830a00bedd57f295d4d0e4072189e1881a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1680760
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarShu Chen <shuchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675822}
parent 8f2418c5
...@@ -164,7 +164,9 @@ void ComponentExtensionIMEManagerImpl::Load(Profile* profile, ...@@ -164,7 +164,9 @@ void ComponentExtensionIMEManagerImpl::Load(Profile* profile,
// url won't be override by IME component extensions. // url won't be override by IME component extensions.
base::FilePath* copied_file_path = new base::FilePath(file_path); base::FilePath* copied_file_path = new base::FilePath(file_path);
base::PostTaskWithTraitsAndReplyWithResult( base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT}, // USER_BLOCKING because it is on the critical path of displaying the
// virtual keyboard. See https://crbug.com/976542
FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_BLOCKING},
base::Bind(&CheckFilePath, base::Unretained(copied_file_path)), base::Bind(&CheckFilePath, base::Unretained(copied_file_path)),
base::Bind(&OnFilePathChecked, base::Unretained(profile), base::Bind(&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