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

Unified Diff: base/test/scoped_task_environment.cc

Issue 2885783002: Add ScopedTaskEnvironment::GetMainThreadTaskRunner(). (Closed)
Patch Set: self-review Created 3 years, 7 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/scoped_task_environment.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_task_environment.cc
diff --git a/base/test/scoped_task_environment.cc b/base/test/scoped_task_environment.cc
index 22ed28cd2c6f535b6049195583a1f7d1327ae3d3..8ccf040a3fea88d3ca22114d07c5773a468cf001 100644
--- a/base/test/scoped_task_environment.cc
+++ b/base/test/scoped_task_environment.cc
@@ -66,6 +66,11 @@ ScopedTaskEnvironment::~ScopedTaskEnvironment() {
TaskScheduler::SetInstance(nullptr);
}
+scoped_refptr<base::SingleThreadTaskRunner>
+ScopedTaskEnvironment::GetMainThreadTaskRunner() {
+ return message_loop_.task_runner();
+}
+
void ScopedTaskEnvironment::RunUntilIdle() {
for (;;) {
TaskScheduler::GetInstance()->FlushForTesting();
« no previous file with comments | « base/test/scoped_task_environment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698