Chromium Code Reviews| 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/threading/post_task_and_reply_impl.h" | |
| 9 #include "base/tracked_objects.h" | |
| 10 | |
| 11 namespace base { | |
| 12 | |
| 13 namespace { | |
| 14 | |
| 15 class PostTaskAndReplyWorkerPool : public internal::PostTaskAndReplyImpl { | |
| 16 public: | |
| 17 PostTaskAndReplyWorkerPool(bool task_is_slow) : task_is_slow_(task_is_slow) { | |
| 18 } | |
| 19 | |
| 20 bool PostTask(const tracked_objects::Location& from_here, | |
|
willchan no longer on Chromium
2011/10/13 22:33:45
virtual and OVERRIDE
Jói
2011/10/13 22:46:07
Done.
| |
| 21 const Closure& task) { | |
| 22 return WorkerPool::PostTask(from_here, task, task_is_slow_); | |
| 23 } | |
| 24 | |
| 25 private: | |
| 26 bool task_is_slow_; | |
| 27 }; | |
| 28 | |
| 29 } // namespace | |
| 30 | |
| 31 bool WorkerPool::PostTaskAndReply(const tracked_objects::Location& from_here, | |
| 32 const Closure& task, | |
| 33 const Closure& reply, | |
| 34 bool task_is_slow) { | |
| 35 return PostTaskAndReplyWorkerPool(task_is_slow).PostTaskAndReply( | |
| 36 from_here, task, reply); | |
| 37 } | |
| 38 | |
| 39 } // namespace base | |
| OLD | NEW |