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

Unified Diff: base/task_runner.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/sequenced_task_runner.cc ('k') | base/task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_runner.h
diff --git a/base/task_runner.h b/base/task_runner.h
index d6a387109a32f1eacb3b8aeee392c0ca1eb0a7fd..0421d564e6d75cdc8f7d763ba5c95a3b37169067 100644
--- a/base/task_runner.h
+++ b/base/task_runner.h
@@ -61,7 +61,7 @@ class BASE_EXPORT TaskRunner
// will not be run.
//
// Equivalent to PostDelayedTask(from_here, task, 0).
- bool PostTask(const tracked_objects::Location& from_here, Closure task);
+ bool PostTask(const tracked_objects::Location& from_here, OnceClosure task);
// Like PostTask, but tries to run the posted task only after
// |delay_ms| has passed.
@@ -69,7 +69,7 @@ class BASE_EXPORT TaskRunner
// It is valid for an implementation to ignore |delay_ms|; that is,
// to have PostDelayedTask behave the same as PostTask.
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- Closure task,
+ OnceClosure task,
base::TimeDelta delay) = 0;
// Returns true if the current thread is a thread on which a task
@@ -122,8 +122,8 @@ class BASE_EXPORT TaskRunner
// and the reply will cancel itself safely because it is bound to a
// WeakPtr<>.
bool PostTaskAndReply(const tracked_objects::Location& from_here,
- Closure task,
- Closure reply);
+ OnceClosure task,
+ OnceClosure reply);
protected:
friend struct TaskRunnerTraits;
« no previous file with comments | « base/sequenced_task_runner.cc ('k') | base/task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698