Chromium Code Reviews| Index: chrome/app/chrome_main_delegate.cc |
| diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc |
| index 6f14d82a3bf7add592083cd795844283992fdec7..6449c518977876192fc5b4157e9c9b04bbffce1a 100644 |
| --- a/chrome/app/chrome_main_delegate.cc |
| +++ b/chrome/app/chrome_main_delegate.cc |
| @@ -641,9 +641,23 @@ void ChromeMainDelegate::PreSandboxStartup() { |
| // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
| // sets this up for the browser process in a different manner. Zygotes |
| // need to call InitCrashReporter() in RunZygote(). |
| - if (!process_type.empty() && process_type != switches::kZygoteProcess) |
| + if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
| +#if defined(OS_ANDROID) |
| + // On Android we need to provide a FD to the file where the minidump is |
| + // generated as the renderer and browser run with different UIDs |
|
Lei Zhang
2012/10/23 02:57:34
nit: "run with"
Jay Civelli
2012/10/23 20:39:55
Done.
|
| + // (preventing the browser from inspecting the renderer process). |
| + int minidump_fd = base::GlobalDescriptors::GetInstance()-> |
| + MaybeGet(kAndroidMinidumpDescriptor); |
| + if (minidump_fd == base::kInvalidPlatformFileValue) { |
| + NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; |
| + } else { |
| + InitNonBrowserCrashReporterForAndroid(minidump_fd); |
| + } |
| +#else |
| InitCrashReporter(); |
| #endif |
| + } |
| +#endif |
| #if defined(OS_CHROMEOS) |
| // Read and cache ChromeOS version from file, |