| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/task_scheduler/task_scheduler.h" | 10 #include "base/task_scheduler/task_scheduler.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits( | 90 scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits( |
| 91 const TaskTraits& traits) { | 91 const TaskTraits& traits) { |
| 92 DCHECK(TaskScheduler::GetInstance()) | 92 DCHECK(TaskScheduler::GetInstance()) |
| 93 << "Ref. Prerequisite section of post_task.h"; | 93 << "Ref. Prerequisite section of post_task.h"; |
| 94 return TaskScheduler::GetInstance()->CreateSingleThreadTaskRunnerWithTraits( | 94 return TaskScheduler::GetInstance()->CreateSingleThreadTaskRunnerWithTraits( |
| 95 traits); | 95 traits); |
| 96 } | 96 } |
| 97 | 97 |
| 98 #if defined(OS_WIN) |
| 99 scoped_refptr<SingleThreadTaskRunner> CreateCOMSTATaskRunnerWithTraits( |
| 100 const TaskTraits& traits) { |
| 101 DCHECK(TaskScheduler::GetInstance()) |
| 102 << "Ref. Prerequisite section of post_task.h"; |
| 103 return TaskScheduler::GetInstance()->CreateCOMSTATaskRunnerWithTraits(traits); |
| 104 } |
| 105 #endif // defined(OS_WIN) |
| 106 |
| 98 } // namespace base | 107 } // namespace base |
| OLD | NEW |