| Index: base/test/test_simple_task_runner.cc
|
| diff --git a/base/test/test_simple_task_runner.cc b/base/test/test_simple_task_runner.cc
|
| index 29d0208fecd2ebeb1a2784597f5f26018d9580a7..08dd162438b955c79cb25ae1f79ea9178396fd9f 100644
|
| --- a/base/test/test_simple_task_runner.cc
|
| +++ b/base/test/test_simple_task_runner.cc
|
| @@ -14,23 +14,23 @@ TestSimpleTaskRunner::~TestSimpleTaskRunner() = default;
|
|
|
| bool TestSimpleTaskRunner::PostDelayedTask(
|
| const tracked_objects::Location& from_here,
|
| - const Closure& task,
|
| + OnceClosure task,
|
| TimeDelta delay) {
|
| AutoLock auto_lock(lock_);
|
| - pending_tasks_.push_back(
|
| - TestPendingTask(from_here, task, TimeTicks(), delay,
|
| - TestPendingTask::NESTABLE));
|
| + pending_tasks_.push_back(TestPendingTask(from_here, std::move(task),
|
| + TimeTicks(), delay,
|
| + TestPendingTask::NESTABLE));
|
| return true;
|
| }
|
|
|
| bool TestSimpleTaskRunner::PostNonNestableDelayedTask(
|
| const tracked_objects::Location& from_here,
|
| - const Closure& task,
|
| + OnceClosure task,
|
| TimeDelta delay) {
|
| AutoLock auto_lock(lock_);
|
| - pending_tasks_.push_back(
|
| - TestPendingTask(from_here, task, TimeTicks(), delay,
|
| - TestPendingTask::NON_NESTABLE));
|
| + pending_tasks_.push_back(TestPendingTask(from_here, std::move(task),
|
| + TimeTicks(), delay,
|
| + TestPendingTask::NON_NESTABLE));
|
| return true;
|
| }
|
|
|
| @@ -84,8 +84,8 @@ void TestSimpleTaskRunner::RunPendingTasks() {
|
| tasks_to_run.swap(pending_tasks_);
|
| }
|
|
|
| - for (const auto& task : tasks_to_run)
|
| - task.task.Run();
|
| + for (auto& task : tasks_to_run)
|
| + std::move(task.task).Run();
|
| }
|
|
|
| void TestSimpleTaskRunner::RunUntilIdle() {
|
|
|