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

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: Address review comments. Fix compile issue after merge to lkgr. 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
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 virtual bool PostTask(const tracked_objects::Location& from_here,
willchan no longer on Chromium 2011/10/13 22:59:56 private
Jói 2011/10/13 23:02:49 Done.
22 const Closure& task) OVERRIDE {
23 return WorkerPool::PostTask(from_here, task, task_is_slow_);
24 }
25
26 private:
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

Powered by Google App Engine
This is Rietveld 408576698