Chromium Code Reviews| Index: base/test/scoped_task_scheduler.cc |
| diff --git a/base/test/scoped_task_scheduler.cc b/base/test/scoped_task_scheduler.cc |
| index 3c5b0e2fc7807a6b14ecddd640109a46c26aa417..5a01f57e8a37d427b4d458c9700684ed12d1f3e2 100644 |
| --- a/base/test/scoped_task_scheduler.cc |
| +++ b/base/test/scoped_task_scheduler.cc |
| @@ -47,6 +47,7 @@ class TestTaskScheduler : public TaskScheduler { |
| ~TestTaskScheduler() override; |
| // TaskScheduler: |
| + void Start(const TaskScheduler::InitParams& init_params) override; |
| void PostDelayedTaskWithTraits(const tracked_objects::Location& from_here, |
| const TaskTraits& traits, |
| OnceClosure task, |
| @@ -164,6 +165,13 @@ TestTaskScheduler::~TestTaskScheduler() { |
| Shutdown(); |
| } |
| +void TestTaskScheduler::Start(const TaskScheduler::InitParams&) { |
| + // ScopedTaskScheduler intentionally breaks the TaskScheduler contract of not |
|
robliao
2017/04/24 22:32:19
This comment should probably go at the top of Test
gab
2017/04/25 15:16:15
Agreed, also this is another argument for getting
fdoray
2017/04/25 18:43:35
Done.
|
| + // running tasks before Start(). This avoid having to call Start() with dummy |
| + // parameters. |
| + NOTREACHED(); |
| +} |
| + |
| void TestTaskScheduler::PostDelayedTaskWithTraits( |
| const tracked_objects::Location& from_here, |
| const TaskTraits& traits, |