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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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/task_scheduler/test_task_factory.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index eb9e3699d6dd59cf2f3a47020e3107d4bb3cd1f1..4553002e320b65f3c36d73efe04a68180548bf59 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -472,10 +472,10 @@ void DoLaunchChildTestProcess(
// Run target callback on the thread it was originating from, not on
// a worker pool thread.
- task_runner->PostTask(
- FROM_HERE,
- Bind(&RunCallback, completed_callback, exit_code,
- TimeTicks::Now() - start_time, was_timeout, output_file_contents));
+ task_runner->PostTask(FROM_HERE,
+ BindOnce(&RunCallback, completed_callback, exit_code,
+ TimeTicks::Now() - start_time, was_timeout,
+ output_file_contents));
}
} // namespace
@@ -544,7 +544,7 @@ bool TestLauncher::Run() {
watchdog_timer_.Reset();
ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this)));
+ FROM_HERE, BindOnce(&TestLauncher::RunTestIteration, Unretained(this)));
RunLoop().Run();
@@ -576,11 +576,11 @@ void TestLauncher::LaunchChildGTestProcess(
GetTaskRunner()->PostTask(
FROM_HERE,
- Bind(&DoLaunchChildTestProcess, new_command_line, timeout, options,
- redirect_stdio, RetainedRef(ThreadTaskRunnerHandle::Get()),
- Bind(&TestLauncher::OnLaunchTestProcessFinished, Unretained(this),
- completed_callback),
- launched_callback));
+ BindOnce(&DoLaunchChildTestProcess, new_command_line, timeout, options,
+ redirect_stdio, RetainedRef(ThreadTaskRunnerHandle::Get()),
+ Bind(&TestLauncher::OnLaunchTestProcessFinished,
+ Unretained(this), completed_callback),
+ launched_callback));
}
void TestLauncher::OnTestFinished(const TestResult& original_result) {
@@ -1071,7 +1071,7 @@ void TestLauncher::RunTests() {
// No tests have actually been started, so kick off the next iteration.
ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this)));
+ FROM_HERE, BindOnce(&TestLauncher::RunTestIteration, Unretained(this)));
}
}
@@ -1097,7 +1097,7 @@ void TestLauncher::RunTestIteration() {
results_tracker_.OnTestIterationStarting();
ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, Bind(&TestLauncher::RunTests, Unretained(this)));
+ FROM_HERE, BindOnce(&TestLauncher::RunTests, Unretained(this)));
}
void TestLauncher::MaybeSaveSummaryAsJSON(
@@ -1152,7 +1152,7 @@ void TestLauncher::OnTestIterationFinished() {
// Kick off the next iteration.
ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this)));
+ FROM_HERE, BindOnce(&TestLauncher::RunTestIteration, Unretained(this)));
}
void TestLauncher::OnOutputTimeout() {
« no previous file with comments | « base/task_scheduler/test_task_factory.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698