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

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

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | base/trace_event/memory_dump_manager_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return false; 57 return false;
58 } 58 }
59 59
60 return true; 60 return true;
61 } 61 }
62 62
63 } // namespace 63 } // namespace
64 64
65 // static 65 // static
66 bool WorkerPool::PostTask(const tracked_objects::Location& from_here, 66 bool WorkerPool::PostTask(const tracked_objects::Location& from_here,
67 base::Closure task, 67 base::OnceClosure task,
68 bool task_is_slow) { 68 bool task_is_slow) {
69 PendingTask* pending_task = new PendingTask(from_here, std::move(task)); 69 PendingTask* pending_task = new PendingTask(from_here, std::move(task));
70 return PostTaskInternal(pending_task, task_is_slow); 70 return PostTaskInternal(pending_task, task_is_slow);
71 } 71 }
72 72
73 // static 73 // static
74 bool WorkerPool::RunsTasksOnCurrentThread() { 74 bool WorkerPool::RunsTasksOnCurrentThread() {
75 return GetWorkerPoolRunningOnThisThread()->Get(); 75 return GetWorkerPoolRunningOnThisThread()->Get();
76 } 76 }
77 77
78 } // namespace base 78 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698