Commit 1f4e3081 authored by ssid's avatar ssid Committed by Commit Bot

Load shared proto database in user visible priority

Download DB requires the db to load in this priority and making the
shared one BEST_EFFORT causes delays in downloads.

BUG=1006954

Change-Id: I3154b8f3d782b8367b524063e6def1f0b1d322be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839231Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Reviewed-by: default avatarEric Lawrence [MSFT] <ericlaw@microsoft.com>
Commit-Queue: ssid <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703032}
parent 140a71fd
......@@ -60,7 +60,11 @@ SharedProtoDatabase::SharedProtoDatabase(const std::string& client_db_id,
const base::FilePath& db_dir)
: task_runner_(base::CreateSequencedTaskRunner(
{base::ThreadPool(), base::MayBlock(),
base::TaskPriority::BEST_EFFORT,
// crbug/1006954 and crbug/976223 explain why one of the clients
// needs run in visible priority. Download DB is always loaded to
// check for in progress downloads at startup. So, always load shared
// db in USER_VISIBLE priority.
base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN})),
db_dir_(db_dir),
db_(std::make_unique<LevelDB>(client_db_id.c_str())),
......
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