Commit 8980b4eb authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

Quota: Avoid BEST_EFFORT task priority.

In crrev.com/c/1699373 BEST_EFFORT tasks were changed to delay
until after browser startup.  This unfortunately seems to also delay
any storage API access that is managed by quota since quota
initialization uses a BEST_EFFORT task.

This change modifies the quota sub-system to use a USER_VISIBLE task
so that initialize can complete prior to browser startup completing.
This is an appropriate priority since storage APIs like cache_storage
can block loading which is a user visible action.

Bug: 1006546,1005983,1004041
Change-Id: I7fd0659855f26d0f3c1caf0185f2e9723c55c483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819595Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699029}
parent 46018723
......@@ -140,7 +140,7 @@ void GetNominalDynamicSettings(const base::FilePath& partition_path,
OptionalQuotaSettingsCallback callback) {
base::PostTaskAndReplyWithResult(
FROM_HERE,
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT,
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
base::BindOnce(&CalculateNominalDynamicSettings, partition_path,
is_incognito, base::Unretained(disk_info_helper)),
......
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