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

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

Issue 9086002: base::Bind: Remove Task. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix. Created 8 years, 11 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_posix.cc ('k') | chrome/test/webdriver/webdriver_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/threading/worker_pool.h" 5 #include "base/threading/worker_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/pending_task.h" 10 #include "base/pending_task.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 delete pending_task; 46 delete pending_task;
47 return false; 47 return false;
48 } 48 }
49 49
50 return true; 50 return true;
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 bool WorkerPool::PostTask(const tracked_objects::Location& from_here, 55 bool WorkerPool::PostTask(const tracked_objects::Location& from_here,
56 Task* task, bool task_is_slow) {
57 PendingTask* pending_task =
58 new PendingTask(from_here,
59 base::Bind(&subtle::TaskClosureAdapter::Run,
60 new subtle::TaskClosureAdapter(task)));
61 return PostTaskInternal(pending_task, task_is_slow);
62 }
63
64 bool WorkerPool::PostTask(const tracked_objects::Location& from_here,
65 const base::Closure& task, bool task_is_slow) { 56 const base::Closure& task, bool task_is_slow) {
66 PendingTask* pending_task = new PendingTask(from_here, task); 57 PendingTask* pending_task = new PendingTask(from_here, task);
67 return PostTaskInternal(pending_task, task_is_slow); 58 return PostTaskInternal(pending_task, task_is_slow);
68 } 59 }
69 60
70 } // namespace base 61 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | chrome/test/webdriver/webdriver_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698