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

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: 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/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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698