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

Unified Diff: base/task_scheduler/task_scheduler_impl.h

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.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler_impl.h
diff --git a/base/task_scheduler/task_scheduler_impl.h b/base/task_scheduler/task_scheduler_impl.h
index 7460cb1a5bcc5227d21711cc0b90f5caea6d9b5d..1307573ef0479453914e15ce87c1574407d33500 100644
--- a/base/task_scheduler/task_scheduler_impl.h
+++ b/base/task_scheduler/task_scheduler_impl.h
@@ -38,17 +38,12 @@ namespace internal {
// Default TaskScheduler implementation. This class is thread-safe.
class BASE_EXPORT TaskSchedulerImpl : public TaskScheduler {
public:
- // Creates and returns an initialized TaskSchedulerImpl. CHECKs on failure.
- // |name| is used to label threads and histograms. It should identify the
- // component that creates the TaskScheduler. |init_params| contains params to
- // initialize worker pools.
- static std::unique_ptr<TaskSchedulerImpl> Create(
- StringPiece name,
- const TaskScheduler::InitParams& init_params);
-
+ // |name| is used to label threads and histograms.
+ explicit TaskSchedulerImpl(StringPiece name);
~TaskSchedulerImpl() override;
// TaskScheduler:
+ void Start(const TaskScheduler::InitParams& init_params) override;
void PostDelayedTaskWithTraits(const tracked_objects::Location& from_here,
const TaskTraits& traits,
OnceClosure task,
@@ -71,10 +66,6 @@ class BASE_EXPORT TaskSchedulerImpl : public TaskScheduler {
void JoinForTesting() override;
private:
- explicit TaskSchedulerImpl(StringPiece name);
-
- void Initialize(const TaskScheduler::InitParams& init_params);
-
// Returns the worker pool that runs Tasks with |traits|.
SchedulerWorkerPoolImpl* GetWorkerPoolForTraits(
const TaskTraits& traits) const;
« no previous file with comments | « base/task_scheduler/task_scheduler.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698