OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/task_scheduler/post_task.h" |
| 6 |
| 7 #include "base/task_scheduler/task_scheduler.h" |
| 8 |
| 9 namespace base { |
| 10 |
| 11 void PostTask(const tracked_objects::Location& from_here, const Closure& task) { |
| 12 PostTaskWithTraits(from_here, TaskTraits(), task); |
| 13 } |
| 14 |
| 15 void PostTaskAndReply(const tracked_objects::Location& from_here, |
| 16 const Closure& task, |
| 17 const Closure& reply) { |
| 18 PostTaskWithTraitsAndReply(from_here, TaskTraits(), task, reply); |
| 19 } |
| 20 |
| 21 void PostTaskWithTraits(const tracked_objects::Location& from_here, |
| 22 TaskTraits traits, |
| 23 const Closure& task) { |
| 24 TaskScheduler::GetInstance()->PostTaskWithTraits(from_here, traits, task); |
| 25 } |
| 26 |
| 27 void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here, |
| 28 TaskTraits traits, |
| 29 const Closure& task, |
| 30 const Closure& reply) { |
| 31 // TODO: Post and reply wrapper. |
| 32 NOTIMPLEMENTED(); |
| 33 } |
| 34 |
| 35 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits( |
| 36 TaskTraits traits, |
| 37 ExecutionMode execution_mode) { |
| 38 return TaskScheduler::GetInstance()->CreateTaskRunnerWithTraits( |
| 39 traits, execution_mode); |
| 40 } |
| 41 |
| 42 } // namespace base |
OLD | NEW |