Commit 52c1efc6 authored by Long Cheng's avatar Long Cheng Committed by Commit Bot

Change task priority to load icon from file.

When loading icon from file thread, user may say default package icon on
shelf/launcher. Change the task priority to USER_VISIBLE.
The change would also match the description of TaskPriority::USER_VISIBLE.
"Loading an image that is displayed in the UI but is non-critical"

Bug: 1010311
Bug: 997875
Change-Id: Ic6a96b1fc1aef533f1cc9e9192a860d3cbe5a34f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1842295Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Long Cheng <lgcheng@google.com>
Cr-Commit-Position: refs/heads/master@{#703022}
parent 685e45b5
......@@ -305,7 +305,7 @@ void ArcAppIcon::LoadForScaleFactor(ui::ScaleFactor scale_factor) {
base::PostTaskAndReplyWithResult(
FROM_HERE,
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT},
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE},
base::BindOnce(
&ArcAppIcon::ReadOnFileThread, scale_factor, path,
prefs->MaybeGetIconPathForDefaultApp(mapped_app_id_, descriptor)),
......
......@@ -217,7 +217,7 @@ void CrostiniAppIcon::LoadForScaleFactor(ui::ScaleFactor scale_factor) {
base::PostTaskAndReplyWithResult(
FROM_HERE,
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT},
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE},
base::BindOnce(&CrostiniAppIcon::ReadOnFileThread, scale_factor, path),
base::BindOnce(&CrostiniAppIcon::OnIconRead,
weak_ptr_factory_.GetWeakPtr()));
......
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