Index: chrome/app/chrome_main_delegate.cc |
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc |
index 2d8b3951707c12cecce4aaf79ebd4b500fec6f19..268920c5fae18d519ee3a49a8f43b6c19f3c2f20 100644 |
--- a/chrome/app/chrome_main_delegate.cc |
+++ b/chrome/app/chrome_main_delegate.cc |
@@ -146,7 +146,7 @@ base::LazyInstance<ChromeContentBrowserClient> g_chrome_content_browser_client = |
LAZY_INSTANCE_INITIALIZER; |
#endif |
-#if defined(OS_POSIX) || defined(OS_WIN) |
+#if defined(OS_POSIX) |
base::LazyInstance<ChromeCrashReporterClient>::Leaky g_chrome_crash_client = |
LAZY_INSTANCE_INITIALIZER; |
#endif |
@@ -498,7 +498,10 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { |
InstallHandleHooks(); |
#endif |
+#if !defined(OS_WIN) |
+ // This is done earlier in chrome.exe on Windows. |
chrome::RegisterPathProvider(); |
+#endif |
#if defined(OS_CHROMEOS) |
chromeos::RegisterPathProvider(); |
#endif |
@@ -665,7 +668,7 @@ void ChromeMainDelegate::PreSandboxStartup() { |
std::string process_type = |
command_line.GetSwitchValueASCII(switches::kProcessType); |
-#if defined(OS_POSIX) || defined(OS_WIN) |
+#if defined(OS_POSIX) |
crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer()); |
#endif |
@@ -680,16 +683,6 @@ void ChromeMainDelegate::PreSandboxStartup() { |
#endif |
#if defined(OS_WIN) |
- // TODO(scottmg): It would be nice to do this earlier to catch early crashes, |
- // perhaps as early as WinMain in chrome.exe. This would require some code |
- // restructuring to have paths and command lines set up, and also to handle |
- // having some of the code live in chrome.exe, while having the database be |
- // accessed by browser code in chrome.dll (to get a list of uploaded crashes |
- // for chrome://crashes). |
- crash_reporter::InitializeCrashpad(process_type.empty(), process_type); |
-#endif // OS_WIN |
- |
-#if defined(OS_WIN) |
child_process_logging::Init(); |
#endif |
#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) |