Commit 716a421f authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Use USER_VISIBLE task priority for Widevine CDM component installer

When using BEST_EFFORT, the CDM is registered pretty late that browser tests
are failing, and if we specify a site playing encrypted media on command line,
the site will find Widevine not supproted (because it's not registered yet).

This CL changes the task priority to be USER_VISIBLE to solve this issue.

Bug: 900169
Test: Failing tests are passing now.
Change-Id: I8530048a07d804f5d99637745a8b7db0851ff221
Reviewed-on: https://chromium-review.googlesource.com/c/1308974
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604285}
parent 4dfeeb2c
...@@ -462,8 +462,10 @@ void WidevineCdmComponentInstallerPolicy::ComponentReady( ...@@ -462,8 +462,10 @@ void WidevineCdmComponentInstallerPolicy::ComponentReady(
return; return;
} }
// Widevine CDM affects encrypted media playback, hence USER_VISIBLE.
// See http://crbug.com/900169 for the context.
base::PostTaskWithTraits( base::PostTaskWithTraits(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT}, FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
base::BindOnce(&WidevineCdmComponentInstallerPolicy::UpdateCdmPath, base::BindOnce(&WidevineCdmComponentInstallerPolicy::UpdateCdmPath,
base::Unretained(this), version, path, base::Unretained(this), version, path,
base::Passed(&manifest))); base::Passed(&manifest)));
......
...@@ -62,8 +62,10 @@ ComponentInstaller::~ComponentInstaller() {} ...@@ -62,8 +62,10 @@ ComponentInstaller::~ComponentInstaller() {}
void ComponentInstaller::Register(ComponentUpdateService* cus, void ComponentInstaller::Register(ComponentUpdateService* cus,
base::OnceClosure callback) { base::OnceClosure callback) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// Some components may affect user visible features, hence USER_VISIBLE.
task_runner_ = base::CreateSequencedTaskRunnerWithTraits( task_runner_ = base::CreateSequencedTaskRunnerWithTraits(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT, {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
if (!installer_policy_) { if (!installer_policy_) {
......
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