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 |