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

Unified Diff: content/browser/browser_thread_impl.cc

Issue 11649032: Flush SequenceWorkerPool tasks after each unit test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: content/browser/browser_thread_impl.cc
===================================================================
--- content/browser/browser_thread_impl.cc (revision 178148)
+++ content/browser/browser_thread_impl.cc (working copy)
@@ -87,6 +87,14 @@
globals.blocking_pool->Shutdown(kMaxNewShutdownBlockingTasks);
}
+// static
+void BrowserThreadImpl::FlushThreadPoolForTesting() {
+ // We don't want to create a pool if none exists.
+ if (g_globals == NULL)
+ return;
+ g_globals.Get().blocking_pool->FlushForTesting();
+}
+
void BrowserThreadImpl::Init() {
BrowserThreadGlobals& globals = g_globals.Get();

Powered by Google App Engine
This is Rietveld 408576698