Commit 5b9183bb authored by Chris Cunningham's avatar Chris Cunningham Committed by Commit Bot

MediaCapabilities: Make DB task pri USER_VISIBLE

Many DB operations are user visible. Blocking DB read can delay
the start of site video. Blocking DB clear can delay clearing
history. Blocking DB initialize can delay both.

UMAs indicate some DB operations take a long while. Hopefully this
is the root of the issue.

Bug: 1040098
Change-Id: I29c5173cf6d8795990664af0d4584edf6568a794
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148120
Auto-Submit: Chrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758961}
parent c6e7208e
...@@ -124,7 +124,7 @@ std::unique_ptr<VideoDecodeStatsDBImpl> VideoDecodeStatsDBImpl::Create( ...@@ -124,7 +124,7 @@ std::unique_ptr<VideoDecodeStatsDBImpl> VideoDecodeStatsDBImpl::Create(
auto proto_db = db_provider->GetDB<DecodeStatsProto>( auto proto_db = db_provider->GetDB<DecodeStatsProto>(
leveldb_proto::ProtoDbType::VIDEO_DECODE_STATS_DB, db_dir, leveldb_proto::ProtoDbType::VIDEO_DECODE_STATS_DB, db_dir,
base::ThreadPool::CreateSequencedTaskRunner( base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT, {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN})); base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}));
return base::WrapUnique(new VideoDecodeStatsDBImpl(std::move(proto_db))); return base::WrapUnique(new VideoDecodeStatsDBImpl(std::move(proto_db)));
......
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