Chromium Code Reviews| Index: base/threading/worker_pool_win.cc |
| diff --git a/base/threading/worker_pool_win.cc b/base/threading/worker_pool_win.cc |
| index b7eaad1b46fea6594c00c723224fdfaaefccfdb8..79589e132f3fb7457435354adba887c6ffd2f868 100644 |
| --- a/base/threading/worker_pool_win.cc |
| +++ b/base/threading/worker_pool_win.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/debug/trace_event.h" |
| #include "base/logging.h" |
| #include "base/task.h" |
| +#include "base/threading/post_task_and_reply_impl.h" |
| #include "base/tracked_objects.h" |
| namespace base { |
| @@ -71,6 +72,20 @@ bool PostTaskInternal(PendingTask* pending_task, bool task_is_slow) { |
| return true; |
| } |
| +class PostTaskAndReplyWorkerPool : public PostTaskAndReplyImpl { |
| +public: |
| + PostTaskAndReplyWorkerPool(bool task_is_slow) : task_is_slow_(task_is_slow) { |
| + } |
| + |
| + bool PostTask(const tracked_objects::Location& from_here, |
| + const Closure& task) { |
| + return WorkerPool::PostTask(from_here, task, task_is_slow_); |
| + } |
| + |
| +private: |
| + bool task_is_slow_; |
| +}; |
| + |
| } // namespace |
| bool WorkerPool::PostTask(const tracked_objects::Location& from_here, |
| @@ -88,4 +103,12 @@ bool WorkerPool::PostTask(const tracked_objects::Location& from_here, |
| return PostTaskInternal(pending_task, task_is_slow); |
| } |
| +bool WorkerPool::PostTaskAndReply(const tracked_objects::Location& from_here, |
| + const Closure& task, |
| + const Closure& reply, |
| + bool task_is_slow) { |
| + return PostTaskAndReplyWorkerPool(task_is_slow).PostTaskAndReply( |
| + from_here, task, reply); |
|
awong
2011/10/05 17:27:01
Yeah, if PostTaskAndReply were in a header file, t
|
| +} |
| + |
| } // namespace base |