diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 20:25:09 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 20:25:09 +0000 |
commit | 10d8398b778db2c47e712d184147db84e48d8d2a (patch) | |
tree | 69371d12e94fadca6d9de5c94a31adea2cf0c7a3 /chrome/app/chrome_main_win.cc | |
parent | 460d41d11d978aa2fcee2b335025e8828e632a99 (diff) | |
download | chromium_src-10d8398b778db2c47e712d184147db84e48d8d2a.zip chromium_src-10d8398b778db2c47e712d184147db84e48d8d2a.tar.gz chromium_src-10d8398b778db2c47e712d184147db84e48d8d2a.tar.bz2 |
startup: move more platform-specific stuff into separate files
Move LowLevelShutdown into platform-specific files.
Move the CAppModule bits into chrome_main_win.cc.
Mostly refactoring. Semantic change: we now call CAppModule::Init()
slightly earlier than before, and also logging::CleanupChromeLogging()
slightly earlier.
Review URL: http://codereview.chromium.org/6596055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_main_win.cc')
-rw-r--r-- | chrome/app/chrome_main_win.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/app/chrome_main_win.cc b/chrome/app/chrome_main_win.cc index 800e3f2..e10ae76 100644 --- a/chrome/app/chrome_main_win.cc +++ b/chrome/app/chrome_main_win.cc @@ -4,6 +4,8 @@ #include "chrome/app/chrome_main.h" +#include <atlbase.h> +#include <atlapp.h> #include <malloc.h> #include <new.h> #include <shlobj.h> @@ -21,6 +23,8 @@ namespace { +CAppModule _Module; + #pragma optimize("", off) // Handlers for invalid parameter and pure call. They generate a breakpoint to // tell breakpad that it needs to dump the process. @@ -90,8 +94,18 @@ bool LoadUserDataDirPolicyFromRegistry(HKEY hive, FilePath* user_data_dir) { namespace chrome_main { -void LowLevelInit() { +void LowLevelInit(void* instance) { RegisterInvalidParamHandler(); + + _Module.Init(NULL, static_cast<HINSTANCE>(instance)); +} + +void LowLevelShutdown() { +#ifdef _CRTDBG_MAP_ALLOC + _CrtDumpMemoryLeaks(); +#endif // _CRTDBG_MAP_ALLOC + + _Module.Term(); } void CheckUserDataDirPolicy(FilePath* user_data_dir) { |