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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // http://crbug.com/290897 | 111 // http://crbug.com/290897 |
112 // Note: this annotation does not cover tasks posted through a TaskRunner. | 112 // Note: this annotation does not cover tasks posted through a TaskRunner. |
113 ANNOTATE_SCOPED_MEMORY_LEAK; | 113 ANNOTATE_SCOPED_MEMORY_LEAK; |
114 return PostTaskAndReplyWorkerPool(task_is_slow) | 114 return PostTaskAndReplyWorkerPool(task_is_slow) |
115 .PostTaskAndReply(from_here, std::move(task), std::move(reply)); | 115 .PostTaskAndReply(from_here, std::move(task), std::move(reply)); |
116 } | 116 } |
117 | 117 |
118 // static | 118 // static |
119 const scoped_refptr<TaskRunner>& | 119 const scoped_refptr<TaskRunner>& |
120 WorkerPool::GetTaskRunner(bool tasks_are_slow) { | 120 WorkerPool::GetTaskRunner(bool tasks_are_slow) { |
121 static auto task_runner_holder = new TaskRunnerHolder(); | 121 static auto* task_runner_holder = new TaskRunnerHolder(); |
122 return task_runner_holder->taskrunners_[tasks_are_slow]; | 122 return task_runner_holder->taskrunners_[tasks_are_slow]; |
123 } | 123 } |
124 | 124 |
125 } // namespace base | 125 } // namespace base |
OLD | NEW |