OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/task_scheduler/post_task.h" | 5 #include "base/task_scheduler/post_task.h" |
6 | 6 |
7 #include "base/task_scheduler/task_scheduler.h" | 7 #include "base/task_scheduler/task_scheduler.h" |
8 #include "base/threading/post_task_and_reply_impl.h" | 8 #include "base/threading/post_task_and_reply_impl.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 TaskScheduler::GetInstance()->PostTaskWithTraits(from_here, traits, task); | 45 TaskScheduler::GetInstance()->PostTaskWithTraits(from_here, traits, task); |
46 } | 46 } |
47 | 47 |
48 void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here, | 48 void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here, |
49 TaskTraits traits, | 49 TaskTraits traits, |
50 const Closure& task, | 50 const Closure& task, |
51 const Closure& reply) { | 51 const Closure& reply) { |
52 PostTaskAndReplyTaskRunner(traits).PostTaskAndReply(from_here, task, reply); | 52 PostTaskAndReplyTaskRunner(traits).PostTaskAndReply(from_here, task, reply); |
53 } | 53 } |
54 | 54 |
55 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits( | 55 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(const TaskTraits& traits) { |
56 TaskTraits traits, | 56 return TaskScheduler::GetInstance()->CreateTaskRunnerWithTraits(traits); |
57 ExecutionMode execution_mode) { | 57 } |
58 return TaskScheduler::GetInstance()->CreateTaskRunnerWithTraits( | 58 |
59 traits, execution_mode); | 59 scoped_refptr<SequencedTaskRunner> CreateSequencedTaskRunnerWithTraits( |
| 60 const TaskTraits& traits) { |
| 61 return TaskScheduler::GetInstance()->CreateSequencedTaskRunnerWithTraits( |
| 62 traits); |
| 63 } |
| 64 |
| 65 scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits( |
| 66 const TaskTraits& traits) { |
| 67 return TaskScheduler::GetInstance()->CreateSingleThreadTaskRunnerWithTraits( |
| 68 traits); |
60 } | 69 } |
61 | 70 |
62 } // namespace base | 71 } // namespace base |
OLD | NEW |