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

Unified Diff: base/test/scoped_task_scheduler.cc

Issue 2834063002: Separate the create and start phases in TaskSchedulerImpl. (Closed)
Patch Set: self-review 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
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,

Powered by Google App Engine
This is Rietveld 408576698