Skip to content

Commit

Permalink
Use TaskScheduler instead of SequencedWorkerPool in gcm_profile_servi…
Browse files Browse the repository at this point in the history
…ce_unittest.cc.

SequencedWorkerPool is being deprecated in favor of TaskScheduler.

BUG=667892
[email protected]

Review-Url: https://codereview.chromium.org/2879933002
Cr-Commit-Position: refs/heads/master@{#471979}
  • Loading branch information
fdoray authored and Commit bot committed May 16, 2017
1 parent 2f2a04f commit 2b4cf1f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions chrome/browser/gcm/gcm_profile_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/task_scheduler/post_task.h"
#include "build/build_config.h"
#include "chrome/browser/gcm/gcm_product_util.h"
#include "chrome/browser/gcm/gcm_profile_service_factory.h"
Expand Down Expand Up @@ -47,12 +47,9 @@ const char kUserID[] = "user";
std::unique_ptr<KeyedService> BuildGCMProfileService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
base::SequencedWorkerPool* worker_pool =
content::BrowserThread::GetBlockingPool();
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
worker_pool->GetSequenceToken(),
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
base::CreateSequencedTaskRunnerWithTraits(
{base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}));
return base::MakeUnique<gcm::GCMProfileService>(
profile->GetPrefs(), profile->GetPath(), profile->GetRequestContext(),
chrome::GetChannel(),
Expand Down

0 comments on commit 2b4cf1f

Please sign in to comment.