Commit 4b1f1b0c authored by fdoray's avatar fdoray Committed by Commit bot

Use TaskScheduler instead of blocking pool in session_manager_operation.cc.

The blocking pool is being deprecated in favor of TaskScheduler.

BUG=667892
R=bartfab@chromium.org

Review-Url: https://codereview.chromium.org/2836133002
Cr-Commit-Position: refs/heads/master@{#467662}
parent 95bfc8db
......@@ -13,6 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "base/task_runner_util.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
#include "chrome/browser/net/nss_context.h"
......@@ -86,9 +87,12 @@ void SessionManagerOperation::ReportResult(
void SessionManagerOperation::EnsurePublicKey(const base::Closure& callback) {
if (force_key_load_ || !public_key_ || !public_key_->is_loaded()) {
scoped_refptr<base::TaskRunner> task_runner =
content::BrowserThread::GetBlockingPool()
->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
base::CreateTaskRunnerWithTraits(
base::TaskTraits()
.MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN));
base::PostTaskAndReplyWithResult(
task_runner.get(), FROM_HERE,
base::Bind(&SessionManagerOperation::LoadPublicKey, owner_key_util_,
......
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