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

Unified Diff: base/task_scheduler/post_task.cc

Issue 1698183005: Reference CL for the new task scheduler. (Closed) Base URL: https://luckyluke-private.googlesource.com/src@bigmaster2
Patch Set: Created 4 years, 10 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/post_task.h ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/post_task.cc
diff --git a/base/task_scheduler/post_task.cc b/base/task_scheduler/post_task.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1e63aff923bfa54afd6320f01e40335e573e760e
--- /dev/null
+++ b/base/task_scheduler/post_task.cc
@@ -0,0 +1,42 @@
+// Copyright 2016 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.
+
+#include "base/task_scheduler/post_task.h"
+
+#include "base/task_scheduler/task_scheduler.h"
+
+namespace base {
+
+void PostTask(const tracked_objects::Location& from_here, const Closure& task) {
+ PostTaskWithTraits(from_here, TaskTraits(), task);
+}
+
+void PostTaskAndReply(const tracked_objects::Location& from_here,
+ const Closure& task,
+ const Closure& reply) {
+ PostTaskWithTraitsAndReply(from_here, TaskTraits(), task, reply);
+}
+
+void PostTaskWithTraits(const tracked_objects::Location& from_here,
+ TaskTraits traits,
+ const Closure& task) {
+ TaskScheduler::GetInstance()->PostTaskWithTraits(from_here, traits, task);
+}
+
+void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here,
+ TaskTraits traits,
+ const Closure& task,
+ const Closure& reply) {
+ // TODO: Post and reply wrapper.
+ NOTIMPLEMENTED();
+}
+
+scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(
+ TaskTraits traits,
+ ExecutionMode execution_mode) {
+ return TaskScheduler::GetInstance()->CreateTaskRunnerWithTraits(
+ traits, execution_mode);
+}
+
+} // namespace base
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698