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

Unified Diff: base/test/scoped_task_environment.cc

Issue 2845913004: Remove TaskScheduler::CreateAndSetDefaultTaskScheduler(). (Closed)
Patch Set: fix-build-error 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 | « base/test/scoped_async_task_scheduler.cc ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_task_environment.cc
diff --git a/base/test/scoped_task_environment.cc b/base/test/scoped_task_environment.cc
index 1e8782e355433c353ba7328f0e2619898b8a42fd..af871e6a11d4c273197960d73ed3a1a227d32c86 100644
--- a/base/test/scoped_task_environment.cc
+++ b/base/test/scoped_task_environment.cc
@@ -27,10 +27,10 @@ ScopedTaskEnvironment::ScopedTaskEnvironment(MainThreadType main_thread_type)
const SchedulerWorkerPoolParams worker_pool_params(
SchedulerWorkerPoolParams::StandbyThreadPolicy::ONE, kMaxThreads,
kSuggestedReclaimTime);
- TaskScheduler::CreateAndSetDefaultTaskScheduler(
- "ScopedTaskEnvironment", {worker_pool_params, worker_pool_params,
- worker_pool_params, worker_pool_params});
+ TaskScheduler::Create("ScopedTaskEnvironment");
task_scheduler_ = TaskScheduler::GetInstance();
+ TaskScheduler::GetInstance()->Start({worker_pool_params, worker_pool_params,
+ worker_pool_params, worker_pool_params});
}
ScopedTaskEnvironment::~ScopedTaskEnvironment() {
« no previous file with comments | « base/test/scoped_async_task_scheduler.cc ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698