Chromium Code Reviews| Index: base/task_scheduler/task_scheduler.h |
| diff --git a/base/task_scheduler/task_scheduler.h b/base/task_scheduler/task_scheduler.h |
| index b8da64b891a952a4cc629ccae962c32c765c9645..5f851b491cc7bf41434cd162134ca4828fa5ea2a 100644 |
| --- a/base/task_scheduler/task_scheduler.h |
| +++ b/base/task_scheduler/task_scheduler.h |
| @@ -48,24 +48,17 @@ class BASE_EXPORT TaskScheduler { |
| // called once. |
| virtual void Shutdown() = 0; |
| - // SetInstance() and InitializeDefaultTaskScheduler() register a TaskScheduler |
| - // to handle tasks posted through the post_task.h API for this process. The |
| - // registered TaskScheduler will only be deleted when a new TaskScheduler is |
| - // registered (i.e. otherwise leaked on shutdown). The methods must not be |
| - // called when TaskRunners created by the previous TaskScheduler are still |
| - // alive. The methods are not thread-safe; proper synchronization is required |
| - // to use the post_task.h API after registering a new TaskScheduler. |
| - |
| // Registers |task_scheduler| to handle tasks posted through the post_task.h |
| - // API for this process. |
| + // API for this process. The registered TaskScheduler will only be deleted |
| + // when a new TaskScheduler is registered (i.e. otherwise leaked on shutdown). |
| + // This must not be called when TaskRunners created by the previous |
| + // TaskScheduler are still alive. This method is not thread-safe; proper |
| + // synchronization is required to use the post_task.h API after registering a |
| + // new TaskScheduler. |
| static void SetInstance(std::unique_ptr<TaskScheduler> task_scheduler); |
| - // Initializes the default task scheduler for this process. |
| - static void InitializeDefaultTaskScheduler(); |
|
fdoray
2016/06/16 19:33:18
I'm not convinced that we want this method if Task
robliao
2016/06/16 20:51:14
The intention here is to make it easy for tests or
fdoray
2016/06/23 14:37:21
I think we should wait until we have a set of defa
|
| - |
| - // Retrieve the TaskScheduler set via SetInstance() or |
| - // InitializeDefaultTaskScheduler(). This should be used very rarely; most |
| - // users of TaskScheduler should use the post_task.h API. |
| + // Retrieve the TaskScheduler set via SetInstance(). This should be used very |
| + // rarely; most users of TaskScheduler should use the post_task.h API. |
| static TaskScheduler* GetInstance(); |
| }; |