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

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: Rebased Created 6 years, 2 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/cancelable_task_tracker.cc ('k') | base/test/thread_test_helper.h » ('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 eab51f4aed839d95552ac543a09ccb3748939938..03cd54373fad06f6c5b7322f1caaba5f5a297cda 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"
@@ -351,7 +352,7 @@ void DoLaunchChildTestProcess(
base::TimeDelta timeout,
int flags,
bool redirect_stdio,
- scoped_refptr<MessageLoopProxy> message_loop_proxy,
+ scoped_refptr<SequencedTaskRunner> task_runner,
const TestLauncher::LaunchChildGTestProcessCallback& callback) {
TimeTicks start_time = TimeTicks::Now();
@@ -422,14 +423,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
@@ -541,7 +541,7 @@ void TestLauncher::LaunchChildGTestProcess(
timeout,
flags,
redirect_stdio,
- MessageLoopProxy::current(),
+ ThreadTaskRunnerHandle::Get(),
Bind(&TestLauncher::OnLaunchTestProcessFinished,
Unretained(this),
callback)));
« no previous file with comments | « base/task/cancelable_task_tracker.cc ('k') | base/test/thread_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698