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

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

Issue 18618004: Change BrowserThreadDelegate to run Init() async. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init and InitAsync Created 7 years, 5 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
« chrome/browser/io_thread.h ('K') | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_thread_delegate.h
diff --git a/content/public/browser/browser_thread_delegate.h b/content/public/browser/browser_thread_delegate.h
index f91816badce96fd504ddeccea8c56e890eea1128..ad5fd7e57eba160f8618d46a9823fa5e6bbc60ee 100644
--- a/content/public/browser/browser_thread_delegate.h
+++ b/content/public/browser/browser_thread_delegate.h
@@ -10,18 +10,21 @@ namespace content {
// A class with this type may be registered via
// BrowserThread::SetDelegate.
//
-// If registered as such, it will receive an Init() call right before
-// the BrowserThread in question starts its message loop (and right
-// after the BrowserThread has done its own initialization), and a
-// CleanUp call right after the message loop ends (and before the
-// BrowserThread has done its own clean-up).
+// If registered as such, it will schedule to run Init() before the
+// message loop begins and the schedule InitAsync() as the first
+// task on its message loop (after the BrowserThread has done its own
+// initialization), and receive a CleanUp call right after the message
+// loop ends (and before the BrowserThread has done its own clean-up).
class BrowserThreadDelegate {
public:
virtual ~BrowserThreadDelegate() {}
- // Called just prior to starting the message loop.
+ // Called prior to starting the message loop
virtual void Init() = 0;
+ // Called as the first task on the thread's message loop.
+ virtual void InitAsync() = 0;
+
// Called just after the message loop ends.
virtual void CleanUp() = 0;
};
« chrome/browser/io_thread.h ('K') | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698