Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: ios/chrome/browser/application_context_impl.cc

Issue 2875353005: Use TaskScheduler instead of SequencedWorkerPool in application_context_impl.cc. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/application_context_impl.cc
diff --git a/ios/chrome/browser/application_context_impl.cc b/ios/chrome/browser/application_context_impl.cc
index a8359825db95af5e5c62135f185dfbd7f8979bb0..d07e863b7f81cfcdf1d62b48d5017b51f916a13f 100644
--- a/ios/chrome/browser/application_context_impl.cc
+++ b/ios/chrome/browser/application_context_impl.cc
@@ -13,8 +13,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/path_service.h"
-#include "base/sequenced_task_runner.h"
-#include "base/threading/sequenced_worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "base/time/default_clock.h"
#include "base/time/default_tick_clock.h"
#include "base/tracked_objects.h"
@@ -352,11 +351,10 @@ void ApplicationContextImpl::CreateGCMDriver() {
base::FilePath store_path;
CHECK(PathService::Get(ios::DIR_GLOBAL_GCM_STORE, &store_path));
- base::SequencedWorkerPool* worker_pool = web::WebThread::GetBlockingPool();
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
- worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
- worker_pool->GetSequenceToken(),
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
+ base::CreateSequencedTaskRunnerWithTraits(
+ {base::MayBlock(), base::TaskPriority::BACKGROUND,
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}));
gcm_driver_ = gcm::CreateGCMDriverDesktop(
base::WrapUnique(new gcm::GCMClientFactory), GetLocalState(), store_path,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698