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

Unified Diff: base/threading/worker_pool_posix.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase without dcheck_in_ref_count Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: base/threading/worker_pool_posix.cc
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc
index e0efa463f75dcbbaa0ccf20dfc6be5c0ab73f6fe..3ae840a18c2ea18e22746afb406d541d1a5b2243 100644
--- a/base/threading/worker_pool_posix.cc
+++ b/base/threading/worker_pool_posix.cc
@@ -49,7 +49,7 @@ class WorkerPoolImpl {
~WorkerPoolImpl() = delete;
void PostTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
bool task_is_slow);
private:
@@ -61,7 +61,7 @@ WorkerPoolImpl::WorkerPoolImpl()
kIdleSecondsBeforeExit)) {}
void WorkerPoolImpl::PostTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
bool task_is_slow) {
pool_->PostTask(from_here, std::move(task));
}
@@ -114,7 +114,7 @@ void WorkerThread::ThreadMain() {
// static
bool WorkerPool::PostTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
bool task_is_slow) {
g_lazy_worker_pool.Pointer()->PostTask(from_here, std::move(task),
task_is_slow);
@@ -140,7 +140,7 @@ PosixDynamicThreadPool::~PosixDynamicThreadPool() {
void PosixDynamicThreadPool::PostTask(
const tracked_objects::Location& from_here,
- base::Closure task) {
+ base::OnceClosure task) {
PendingTask pending_task(from_here, std::move(task));
AddTask(&pending_task);
}

Powered by Google App Engine
This is Rietveld 408576698