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

Unified Diff: base/task_scheduler/post_task.h

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* 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
« no previous file with comments | « base/task_runner.cc ('k') | base/task_scheduler/post_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/post_task.h
diff --git a/base/task_scheduler/post_task.h b/base/task_scheduler/post_task.h
index 3174f06d63b11369079b84791aea2fb425bd23eb..2e0aeddf84daa2e715977471c2aeb2482b7f76ba 100644
--- a/base/task_scheduler/post_task.h
+++ b/base/task_scheduler/post_task.h
@@ -70,7 +70,7 @@ namespace base {
// Posts |task| to the TaskScheduler. Calling this is equivalent to calling
// PostTaskWithTraits with plain TaskTraits.
BASE_EXPORT void PostTask(const tracked_objects::Location& from_here,
- const Closure& task);
+ Closure task);
// Posts |task| to the TaskScheduler. |task| will not run before |delay|
// expires. Calling this is equivalent to calling PostDelayedTaskWithTraits with
@@ -79,7 +79,7 @@ BASE_EXPORT void PostTask(const tracked_objects::Location& from_here,
// Use PostDelayedTaskWithTraits to specify a BACKGROUND priority if the task
// doesn't have to run as soon as |delay| expires.
BASE_EXPORT void PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
+ Closure task,
TimeDelta delay);
// Posts |task| to the TaskScheduler and posts |reply| on the caller's execution
@@ -107,7 +107,7 @@ void PostTaskAndReplyWithResult(const tracked_objects::Location& from_here,
// Posts |task| with specific |traits| to the TaskScheduler.
BASE_EXPORT void PostTaskWithTraits(const tracked_objects::Location& from_here,
const TaskTraits& traits,
- const Closure& task);
+ Closure task);
// Posts |task| with specific |traits| to the TaskScheduler. |task| will not run
// before |delay| expires.
@@ -117,7 +117,7 @@ BASE_EXPORT void PostTaskWithTraits(const tracked_objects::Location& from_here,
BASE_EXPORT void PostDelayedTaskWithTraits(
const tracked_objects::Location& from_here,
const TaskTraits& traits,
- const Closure& task,
+ Closure task,
TimeDelta delay);
// Posts |task| with specific |traits| to the TaskScheduler and posts |reply| on
« no previous file with comments | « base/task_runner.cc ('k') | base/task_scheduler/post_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698