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

Unified Diff: components/scheduler/child/null_task_queue.h

Issue 1223163006: Implement PostDelayedTaskAt for guaranteed timer ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include to IdleHelperTest. Created 5 years, 5 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 | « components/scheduler/child/idle_helper_unittest.cc ('k') | components/scheduler/child/null_task_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/null_task_queue.h
diff --git a/components/scheduler/child/null_task_queue.h b/components/scheduler/child/null_task_queue.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c4e5d8adfb190209c41a6cbde8c1a1abe4d3418
--- /dev/null
+++ b/components/scheduler/child/null_task_queue.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SCHEDULER_NULL_CHILD_TASK_QUEUE_H_
+#define COMPONENTS_SCHEDULER_NULL_CHILD_TASK_QUEUE_H_
+
+#include "components/scheduler/child/task_queue.h"
+#include "components/scheduler/scheduler_export.h"
+
+namespace scheduler {
+
+class SCHEDULER_EXPORT NullTaskQueue : public TaskQueue {
+ public:
+ NullTaskQueue(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+
+ // TaskQueue implementation
+ bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool PostDelayedTaskAt(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeTicks desired_run_time) override;
+
+ protected:
+ ~NullTaskQueue() override;
+
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(NullTaskQueue);
+};
+
+} // namespace scheduler
+
+#endif // COMPONENTS_SCHEDULER_CHILD_NULL_TASK_QUEUE_H_
« no previous file with comments | « components/scheduler/child/idle_helper_unittest.cc ('k') | components/scheduler/child/null_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698