Index: media/base/fake_single_thread_task_runner.cc |
diff --git a/media/base/fake_single_thread_task_runner.cc b/media/base/fake_single_thread_task_runner.cc |
index 63d741f8a1957c007f1ecc8fccc73ad1d71625fb..c57ae1fd8cf3e11917a3b5722ea1a15eae8cc0fc 100644 |
--- a/media/base/fake_single_thread_task_runner.cc |
+++ b/media/base/fake_single_thread_task_runner.cc |
@@ -20,7 +20,7 @@ FakeSingleThreadTaskRunner::~FakeSingleThreadTaskRunner() {} |
bool FakeSingleThreadTaskRunner::PostDelayedTask( |
const tracked_objects::Location& from_here, |
- base::Closure task, |
+ base::OnceClosure task, |
base::TimeDelta delay) { |
if (fail_on_next_task_) { |
LOG(FATAL) << "Infinite task posting loop detected. Possibly caused by " |
@@ -69,7 +69,7 @@ void FakeSingleThreadTaskRunner::RunTasks() { |
if (clock_->NowTicks() < it->first.first) |
return; |
- base::Closure task = std::move(it->second); |
+ base::OnceClosure task = std::move(it->second); |
tasks_.erase(it); |
std::move(task).Run(); |
} |
@@ -90,9 +90,9 @@ void FakeSingleThreadTaskRunner::Sleep(base::TimeDelta t) { |
} |
clock_->Advance(it->first.first - clock_->NowTicks()); |
- const base::Closure task = it->second; |
+ base::OnceClosure task = std::move(it->second); |
tasks_.erase(it); |
- task.Run(); |
+ std::move(task).Run(); |
} |
// If this point is reached, there's likely some sort of case where a new |
@@ -106,7 +106,7 @@ void FakeSingleThreadTaskRunner::Sleep(base::TimeDelta t) { |
bool FakeSingleThreadTaskRunner::PostNonNestableDelayedTask( |
const tracked_objects::Location& from_here, |
- base::Closure task, |
+ base::OnceClosure task, |
base::TimeDelta delay) { |
NOTIMPLEMENTED(); |
return false; |