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

Unified Diff: chrome/browser/browser_main.h

Issue 3073008: BrowserMain() refactoring, part 2.1. (Closed)
Patch Set: build fix Created 10 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
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.h
diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h
index c7e892585232fe7b5e4d587c66f3505468cff234..f7a5a806441cde94c547e7d462c634cbe51f3f52 100644
--- a/chrome/browser/browser_main.h
+++ b/chrome/browser/browser_main.h
@@ -48,6 +48,22 @@ class NetworkChangeNotifier;
// things which should be done immediately before the start of the main
// message loop should go in |PreMainMessageLoopStart()|.
// - (more to come)
+//
+// How to add stuff (to existing parts):
+// - Figure out when your new code should be executed. What must happen
+// before/after your code is executed? Are there performance reasons for
+// running your code at a particular time? Document these things!
+// - Split out any platform-specific bits. Please avoid #ifdefs it at all
+// possible. You have two choices for platform-specific code: (1) Execute it
+// from one of the platform-specific |Pre/Post...()| methods; do this if the
+// code is unique to a platform type. Or (2) execute it from one of the
+// "parts" (e.g., |EarlyInitialization()|) and provide platform-specific
+// implementations of your code (in a virtual method); do this if you need to
+// provide different implementations across most/all platforms.
+// - Unless your new code is just one or two lines, put it into a separate
+// method with a well-defined purpose. (Likewise, if you're adding to an
+// existing chunk which makes it longer than one or two lines, please move
+// the code out into a separate method.)
class BrowserMainParts {
public:
// This static method is to be implemented by each platform and should
@@ -95,7 +111,7 @@ class BrowserMainParts {
void SpdyFieldTrial();
// Used to initialize NSPR where appropriate.
- void InitializeSSL();
+ virtual void InitializeSSL() = 0;
// Methods for |MainMessageLoopStart()| --------------------------------------
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698