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

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

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Explicit Created 6 years, 5 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
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 56ed4a27024bd95cfcd87a237a46fe54c9d9be0b..7ccbfd877aba8ab5ba03a8eba5aad2c8aa09b5b0 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -33,6 +33,7 @@
#include "base/test/sequenced_worker_pool_owner.h"
#include "base/test/test_switches.h"
#include "base/test/test_timeouts.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -225,7 +226,7 @@ void DoLaunchChildTestProcess(
base::TimeDelta timeout,
bool use_job_objects,
bool redirect_stdio,
- scoped_refptr<MessageLoopProxy> message_loop_proxy,
+ scoped_refptr<SequencedTaskRunner> task_runner,
const TestLauncher::LaunchChildGTestProcessCallback& callback) {
TimeTicks start_time = TimeTicks::Now();
@@ -296,14 +297,13 @@ void DoLaunchChildTestProcess(
// Run target callback on the thread it was originating from, not on
// a worker pool thread.
- message_loop_proxy->PostTask(
- FROM_HERE,
- Bind(&RunCallback,
- callback,
- exit_code,
- TimeTicks::Now() - start_time,
- was_timeout,
- output_file_contents));
+ task_runner->PostTask(FROM_HERE,
+ Bind(&RunCallback,
+ callback,
+ exit_code,
+ TimeTicks::Now() - start_time,
+ was_timeout,
+ output_file_contents));
}
} // namespace
@@ -429,7 +429,7 @@ void TestLauncher::LaunchChildGTestProcess(
timeout,
use_job_objects,
redirect_stdio,
- MessageLoopProxy::current(),
+ ThreadTaskRunnerHandle::Get(),
Bind(&TestLauncher::OnLaunchTestProcessFinished,
Unretained(this),
callback)));

Powered by Google App Engine
This is Rietveld 408576698