Index: base/task_scheduler/scheduler_worker_pool_impl.cc |
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.cc b/base/task_scheduler/scheduler_worker_pool_impl.cc |
index 56e1f7b54eb5e55522e94f047dddf0a7333a62ee..9e61bd7323cf8bcf507f9277de9017e6acc9498c 100644 |
--- a/base/task_scheduler/scheduler_worker_pool_impl.cc |
+++ b/base/task_scheduler/scheduler_worker_pool_impl.cc |
@@ -58,11 +58,11 @@ class SchedulerParallelTaskRunner : public TaskRunner { |
// TaskRunner: |
bool PostDelayedTask(const tracked_objects::Location& from_here, |
- const Closure& closure, |
+ Closure closure, |
TimeDelta delay) override { |
// Post the task as part of a one-off single-task Sequence. |
return worker_pool_->PostTaskWithSequence( |
- MakeUnique<Task>(from_here, closure, traits_, delay), |
+ MakeUnique<Task>(from_here, std::move(closure), traits_, delay), |
make_scoped_refptr(new Sequence)); |
} |
@@ -93,9 +93,10 @@ class SchedulerSequencedTaskRunner : public SequencedTaskRunner { |
// SequencedTaskRunner: |
bool PostDelayedTask(const tracked_objects::Location& from_here, |
- const Closure& closure, |
+ Closure closure, |
TimeDelta delay) override { |
- std::unique_ptr<Task> task(new Task(from_here, closure, traits_, delay)); |
+ std::unique_ptr<Task> task( |
+ new Task(from_here, std::move(closure), traits_, delay)); |
task->sequenced_task_runner_ref = this; |
// Post the task as part of |sequence_|. |
@@ -103,10 +104,10 @@ class SchedulerSequencedTaskRunner : public SequencedTaskRunner { |
} |
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
- const Closure& closure, |
+ Closure closure, |
base::TimeDelta delay) override { |
// Tasks are never nested within the task scheduler. |
- return PostDelayedTask(from_here, closure, delay); |
+ return PostDelayedTask(from_here, std::move(closure), delay); |
} |
bool RunsTasksOnCurrentThread() const override { |