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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 11189068: Changing minidump process generation to be in-process on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced again. Created 8 years, 2 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 | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/android/crash_dump_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 7b6efc2b0f242faaece46fb9a6eb376e6a7f16b5..3b1f0ec5e6cdd206cf9591a96ec87c19a0f4ca0d 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -643,9 +643,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
+ // (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,
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/android/crash_dump_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698