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

Unified Diff: base/task_scheduler/task_scheduler.cc

Issue 2834063002: Separate the create and start phases in TaskSchedulerImpl. (Closed)
Patch Set: CR-robliao-25-grammar 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/task_scheduler/task_scheduler.h ('k') | base/task_scheduler/task_scheduler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler.cc
diff --git a/base/task_scheduler/task_scheduler.cc b/base/task_scheduler/task_scheduler.cc
index e6181dfba00d36458186200b8cbb0590b5b47641..c1eb4323c9fe10724c8366bf1369e9aa67d7546f 100644
--- a/base/task_scheduler/task_scheduler.cc
+++ b/base/task_scheduler/task_scheduler.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/sys_info.h"
#include "base/task_scheduler/scheduler_worker_pool_params.h"
#include "base/task_scheduler/task_scheduler_impl.h"
@@ -68,7 +69,8 @@ void TaskScheduler::CreateAndSetSimpleTaskScheduler(StringPiece name) {
void TaskScheduler::CreateAndSetDefaultTaskScheduler(
StringPiece name,
const InitParams& init_params) {
- SetInstance(internal::TaskSchedulerImpl::Create(name, init_params));
+ SetInstance(MakeUnique<internal::TaskSchedulerImpl>(name));
+ GetInstance()->Start(init_params);
}
// static
« no previous file with comments | « base/task_scheduler/task_scheduler.h ('k') | base/task_scheduler/task_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698