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

Unified Diff: base/test/scoped_task_environment.h

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 | « no previous file | base/test/scoped_task_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_task_environment.h
diff --git a/base/test/scoped_task_environment.h b/base/test/scoped_task_environment.h
index fe7385ea477b14f9079568d52846a197308c5541..f46b516d7c16ddea6d7a6b710fd9a7832045dc29 100644
--- a/base/test/scoped_task_environment.h
+++ b/base/test/scoped_task_environment.h
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
namespace base {
@@ -67,6 +68,9 @@ class ScopedTaskEnvironment {
// TaskScheduler and the (Thread|Sequenced)TaskRunnerHandle.
~ScopedTaskEnvironment();
+ // Returns a TaskRunner that schedules tasks on the main thread.
+ scoped_refptr<base::SingleThreadTaskRunner> GetMainThreadTaskRunner();
+
// Synchronously runs (Thread|Sequenced)TaskRunnerHandle tasks until no
// undelayed (Thread|Sequenced)TaskRunnerHandle or TaskScheduler tasks remain.
void RunUntilIdle();
« no previous file with comments | « no previous file | base/test/scoped_task_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698