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

Unified Diff: content/browser/browser_thread_impl.cc

Issue 949293002: Implement a poor man's PostAfterStartupTask() function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index a8ce1b0dcd510dea55cc7a95829e83bd116bd345..401e597d41822a657380c68a82ed2f6144cc14fe 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -14,6 +14,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_restrictions.h"
+#include "content/browser/after_startup_task_poster_impl.h"
#include "content/public/browser/browser_thread_delegate.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
@@ -365,6 +366,27 @@ bool BrowserThread::PostBlockingPoolSequencedTask(
}
// static
+bool BrowserThread::PostAfterStartupTask(
+ const tracked_objects::Location& from_here,
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Closure& task) {
+ GetAfterStartupTaskPoster().PostAfterStartup(
+ from_here, task_runner, task);
+ return true;
+}
+
+// static
+bool BrowserThread::PostAfterStartupTaskAndReply(
+ const tracked_objects::Location& from_here,
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Closure& task,
+ const base::Closure& reply) {
+ GetAfterStartupTaskPoster().PostAfterStartupAndReply(
+ from_here, task_runner, task, reply);
+ return true;
+}
+
+// static
base::SequencedWorkerPool* BrowserThread::GetBlockingPool() {
return g_globals.Get().blocking_pool.get();
}

Powered by Google App Engine
This is Rietveld 408576698