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

Unified Diff: chrome/browser/android/offline_pages/request_coordinator_factory.cc

Issue 2840653002: Use TaskScheduler instead of blocking pool in request_coordinator_factory.cc. (Closed)
Patch Set: Created 3 years, 8 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: chrome/browser/android/offline_pages/request_coordinator_factory.cc
diff --git a/chrome/browser/android/offline_pages/request_coordinator_factory.cc b/chrome/browser/android/offline_pages/request_coordinator_factory.cc
index 238467580866a7a81c3adc8430ca4ffeabeed7ac..d4bdbb43aca37df275371e980dbe4151ecba91ef 100644
--- a/chrome/browser/android/offline_pages/request_coordinator_factory.cc
+++ b/chrome/browser/android/offline_pages/request_coordinator_factory.cc
@@ -9,7 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/sequenced_task_runner.h"
-#include "base/threading/sequenced_worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "chrome/browser/android/offline_pages/background_loader_offliner.h"
#include "chrome/browser/android/offline_pages/background_scheduler_bridge.h"
#include "chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h"
@@ -29,7 +29,6 @@
#include "components/offline_pages/core/background/scheduler.h"
#include "components/offline_pages/core/downloads/download_notifying_observer.h"
#include "components/offline_pages/core/offline_page_feature.h"
-#include "content/public/browser/browser_thread.h"
#include "net/nqe/network_quality_estimator.h"
namespace offline_pages {
@@ -68,8 +67,9 @@ KeyedService* RequestCoordinatorFactory::BuildServiceInstanceFor(
}
scoped_refptr<base::SequencedTaskRunner> background_task_runner =
- content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
- content::BrowserThread::GetBlockingPool()->GetSequenceToken());
+ base::CreateSequencedTaskRunnerWithTraits(
+ base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND));
Profile* profile = Profile::FromBrowserContext(context);
base::FilePath queue_store_path =
profile->GetPath().Append(chrome::kOfflinePageRequestQueueDirname);
« 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