| Index: base/task_scheduler/post_task.cc
|
| diff --git a/base/task_scheduler/post_task.cc b/base/task_scheduler/post_task.cc
|
| index a1a3bc2da388177be2b607787e4ec9dd338f5f8e..2ed8a490c49bed9da677dbd332640d66a46a9529 100644
|
| --- a/base/task_scheduler/post_task.cc
|
| +++ b/base/task_scheduler/post_task.cc
|
| @@ -21,8 +21,8 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl {
|
|
|
| private:
|
| bool PostTask(const tracked_objects::Location& from_here,
|
| - const Closure& task) override {
|
| - PostTaskWithTraits(from_here, traits_, task);
|
| + Closure task) override {
|
| + PostTaskWithTraits(from_here, traits_, std::move(task));
|
| return true;
|
| }
|
|
|
| @@ -32,14 +32,14 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl {
|
|
|
| } // namespace
|
|
|
| -void PostTask(const tracked_objects::Location& from_here, const Closure& task) {
|
| - PostDelayedTask(from_here, task, TimeDelta());
|
| +void PostTask(const tracked_objects::Location& from_here, Closure task) {
|
| + PostDelayedTask(from_here, std::move(task), TimeDelta());
|
| }
|
|
|
| void PostDelayedTask(const tracked_objects::Location& from_here,
|
| - const Closure& task,
|
| + Closure task,
|
| TimeDelta delay) {
|
| - PostDelayedTaskWithTraits(from_here, TaskTraits(), task, delay);
|
| + PostDelayedTaskWithTraits(from_here, TaskTraits(), std::move(task), delay);
|
| }
|
|
|
| void PostTaskAndReply(const tracked_objects::Location& from_here,
|
| @@ -51,18 +51,18 @@ void PostTaskAndReply(const tracked_objects::Location& from_here,
|
|
|
| void PostTaskWithTraits(const tracked_objects::Location& from_here,
|
| const TaskTraits& traits,
|
| - const Closure& task) {
|
| - PostDelayedTaskWithTraits(from_here, traits, task, TimeDelta());
|
| + Closure task) {
|
| + PostDelayedTaskWithTraits(from_here, traits, std::move(task), TimeDelta());
|
| }
|
|
|
| void PostDelayedTaskWithTraits(const tracked_objects::Location& from_here,
|
| const TaskTraits& traits,
|
| - const Closure& task,
|
| + Closure task,
|
| TimeDelta delay) {
|
| DCHECK(TaskScheduler::GetInstance())
|
| << "Ref. Prerequisite section of post_task.h";
|
| - TaskScheduler::GetInstance()->PostDelayedTaskWithTraits(from_here, traits,
|
| - task, delay);
|
| + TaskScheduler::GetInstance()->PostDelayedTaskWithTraits(
|
| + from_here, traits, std::move(task), delay);
|
| }
|
|
|
| void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here,
|
|
|