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

Unified Diff: content/public/browser/browser_thread.h

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, 9 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/public/browser/browser_thread.h
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
index b3b42290978dab0f36a375591b388a643ab57df9..bc61e7c7f9fba53488368055e8096460366adee3 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -184,6 +184,17 @@ class CONTENT_EXPORT BrowserThread {
const tracked_objects::Location& from_here,
const base::Closure& task);
+ // For use with scheduling non-critical tasks for exeuction after startup.
jam 2015/03/10 23:04:34 nit: spelling
+ // The order or execution of tasks posted here is unspecified even when
+ // posting to a SequencedTaskRunner.
+ // Note: the embedder must override ContentBrowserClient.PostAfterStartupTask
+ // to provide this function, otherwise the default behavior is to post the
+ // task immediately.
jam 2015/03/10 23:04:34 nit: i think the "Note" part is confusing. it star
michaeln 2015/03/20 00:21:28 Done. // Note: see related ContentBrowserClient.P
+ static void PostAfterStartupTask(
+ const tracked_objects::Location& from_here,
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Closure& task);
+
// Returns the thread pool used for blocking file I/O. Use this object to
// perform random blocking operations such as file writes or querying the
// Windows registry.

Powered by Google App Engine
This is Rietveld 408576698