Commit 797a01f1 authored by Owen Min's avatar Owen Min Committed by Commit Bot

Add Block shutdown on MachineLevelUserCloudPolicyStore Task runner

This makes sure the update policy cache operation is always finished.
This flag is used by other cloud policy store also:
https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_impl.cc?type=cs&q=ProfileImpl+Traits&g=0&l=353

Change-Id: Ief21485c12b4a6b666aa8e7ecccb96e4e9540724
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582769
Commit-Queue: Owen Min <zmin@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654533}
parent 76cb36bc
......@@ -135,7 +135,10 @@ MachineLevelUserCloudPolicyController::CreatePolicyManager(
MachineLevelUserCloudPolicyStore::Create(
dm_token, client_id, policy_dir, cloud_policy_has_priority,
base::CreateSequencedTaskRunnerWithTraits(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}));
{base::MayBlock(), base::TaskPriority::BEST_EFFORT,
// Block shutdown to make sure the policy cache update is always
// finished.
base::TaskShutdownBehavior::BLOCK_SHUTDOWN}));
return std::make_unique<MachineLevelUserCloudPolicyManager>(
std::move(policy_store), nullptr, policy_dir,
base::ThreadTaskRunnerHandle::Get(),
......
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