Re-apply 922cff9cd081e3ae327b52d3cc6bd8423307dee0
Original CL: http://codereview.chromium.org/8670001
The CL was reverted @ http://codereview.chromium.org/8774035, with no explanation. Fortunately not too much has changed in the meanwhile. I did make sure to update any moved code that changed.
Change-Id: I5e315b5eca407e944c5f029610638fd03ab27297
BUG=chromium-os:103821
TEST=All tests pass.
[email protected], [email protected]
Review URL: http://codereview.chromium.org/8982002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115009 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h
index 491f5d38..c5a7f4f7 100644
--- a/chrome/browser/chrome_browser_main.h
+++ b/chrome/browser/chrome_browser_main.h
@@ -56,6 +56,9 @@
const content::MainFunctionParams& parameters);
// content::BrowserMainParts overrides.
+ // These are called in-order by content::BrowserMainLoop.
+ // Each stage calls the same stages in any ChromeBrowserMainExtraParts added
+ // with AddParts() from ChromeContentBrowserClient::CreateBrowserMainParts.
virtual void PreEarlyInitialization() OVERRIDE;
virtual void PostEarlyInitialization() OVERRIDE;
virtual void ToolkitInitialized() OVERRIDE;
@@ -71,6 +74,13 @@
virtual void PostStopThread(content::BrowserThread::ID identifier) OVERRIDE;
virtual void PostDestroyThreads() OVERRIDE;
+ // Additional stages for ChromeBrowserMainExtraParts. These stages are called
+ // in order from PreMainMessageLoopStart(). See implementation for details.
+ virtual void PreProfileInit();
+ virtual void PostProfileInit();
+ virtual void PreBrowserStart();
+ virtual void PostBrowserStart();
+
// Displays a warning message that we can't find any locale data files.
virtual void ShowMissingLocaleMessageBox() = 0;
@@ -82,6 +92,7 @@
}
Profile* profile() { return profile_; }
+ MetricsService* metrics() { return metrics_; }
private:
// Methods for |EarlyInitialization()| ---------------------------------------