diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 04:33:47 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 04:33:47 +0000 |
commit | d7dbe28c6a7fde8bd341da525eac18eb57e8a3ef (patch) | |
tree | a422b27a2ef44283330eb672930ffd3af6def6fd /chrome/browser/browser_main.h | |
parent | 6ec74513023f16b2f7260ae509c4bdbb9477ae32 (diff) | |
download | chromium_src-d7dbe28c6a7fde8bd341da525eac18eb57e8a3ef.zip chromium_src-d7dbe28c6a7fde8bd341da525eac18eb57e8a3ef.tar.gz chromium_src-d7dbe28c6a7fde8bd341da525eac18eb57e8a3ef.tar.bz2 |
BrowserMain() refactoring, part 2.1.
1. Move InitializeSSL() into platform-specific files and eliminate #ifdef.
2. Add some instructions on how to add code to BrowserMain().
BUG=none
TEST=everything still works
Review URL: http://codereview.chromium.org/3073008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.h')
-rw-r--r-- | chrome/browser/browser_main.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h index c7e8925..f7a5a80 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()| -------------------------------------- |