Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: base/threading/worker_pool.cc

Issue 8139028: Add WorkerPool::PostTaskAndReply and use in DHCP code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mark private Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool.h ('k') | base/threading/worker_pool_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « base/threading/worker_pool.h ('k') | base/threading/worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698