| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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/threading/worker_pool.h" |
| 6 |
| 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/threading/post_task_and_reply_impl.h" |
| 10 #include "base/tracked_objects.h" |
| 11 |
| 12 namespace base { |
| 13 |
| 14 namespace { |
| 15 |
| 16 class PostTaskAndReplyWorkerPool : public internal::PostTaskAndReplyImpl { |
| 17 public: |
| 18 PostTaskAndReplyWorkerPool(bool task_is_slow) : task_is_slow_(task_is_slow) { |
| 19 } |
| 20 |
| 21 private: |
| 22 virtual bool PostTask(const tracked_objects::Location& from_here, |
| 23 const Closure& task) OVERRIDE { |
| 24 return WorkerPool::PostTask(from_here, task, task_is_slow_); |
| 25 } |
| 26 |
| 27 bool task_is_slow_; |
| 28 }; |
| 29 |
| 30 } // namespace |
| 31 |
| 32 bool WorkerPool::PostTaskAndReply(const tracked_objects::Location& from_here, |
| 33 const Closure& task, |
| 34 const Closure& reply, |
| 35 bool task_is_slow) { |
| 36 return PostTaskAndReplyWorkerPool(task_is_slow).PostTaskAndReply( |
| 37 from_here, task, reply); |
| 38 } |
| 39 |
| 40 } // namespace base |
| OLD | NEW |