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

Unified Diff: base/test/test_simple_task_runner.cc

Issue 2434783002: Use OnceClosure in TestPendingTask (Closed)
Patch Set: +comment Created 3 years, 11 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/test/test_pending_task.cc ('k') | cc/base/delayed_unique_notifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94d8e4834a3b7641296522021cbca850c6a95404..e7779184f390c3b83a1fa4a6b4ae22faeaef9aea 100644
--- a/base/test/test_simple_task_runner.cc
+++ b/base/test/test_simple_task_runner.cc
@@ -78,8 +78,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() {
« no previous file with comments | « base/test/test_pending_task.cc ('k') | cc/base/delayed_unique_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698