OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/threading/worker_pool.h" | 5 #include "base/threading/worker_pool.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/debug/leak_annotations.h" | 9 #include "base/debug/leak_annotations.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/macros.h" |
11 #include "base/task_runner.h" | 12 #include "base/task_runner.h" |
12 #include "base/threading/post_task_and_reply_impl.h" | 13 #include "base/threading/post_task_and_reply_impl.h" |
13 #include "base/tracked_objects.h" | 14 #include "base/tracked_objects.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 class PostTaskAndReplyWorkerPool : public internal::PostTaskAndReplyImpl { | 20 class PostTaskAndReplyWorkerPool : public internal::PostTaskAndReplyImpl { |
20 public: | 21 public: |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 from_here, task, reply); | 117 from_here, task, reply); |
117 } | 118 } |
118 | 119 |
119 // static | 120 // static |
120 const scoped_refptr<TaskRunner>& | 121 const scoped_refptr<TaskRunner>& |
121 WorkerPool::GetTaskRunner(bool tasks_are_slow) { | 122 WorkerPool::GetTaskRunner(bool tasks_are_slow) { |
122 return g_taskrunners.Get().taskrunners_[tasks_are_slow]; | 123 return g_taskrunners.Get().taskrunners_[tasks_are_slow]; |
123 } | 124 } |
124 | 125 |
125 } // namespace base | 126 } // namespace base |
OLD | NEW |