From 82174aa4938e03fbb38098d2cf283cbf09bfb300 Mon Sep 17 00:00:00 2001 From: "yfriedman@chromium.org" Date: Tue, 22 Jan 2013 21:53:43 +0000 Subject: Enable breakpad building by default on Android. After https://chromiumcodereview.appspot.com/10407058 we can compile breakpad by default and still have it disabled for non-official builds. Changes the Android build to allow compiling breakpad but not use it by not creating the crash fd and not passing it to the renderer process unless breakpad is enabled. Changes linux and Android to use a switch for enabling breakpad since that's a lot easier to test with on android then an environment variable. BUG=105778,170530 Review URL: https://chromiumcodereview.appspot.com/11969025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178111 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chrome_content_browser_client.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'chrome/browser/chrome_content_browser_client.cc') diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index d27c0b2..4e6c2cb 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -1840,13 +1840,15 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( FileDescriptor(f, true))); #if defined(USE_LINUX_BREAKPAD) - f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); - if (f == base::kInvalidPlatformFileValue) { - LOG(ERROR) << "Failed to create file for minidump, crash reporting will be " - "disabled for this process."; - } else { - mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, - FileDescriptor(f, true))); + if (IsCrashReporterEnabled()) { + f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); + if (f == base::kInvalidPlatformFileValue) { + LOG(ERROR) << "Failed to create file for minidump, crash reporting will " + "be disabled for this process."; + } else { + mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, + FileDescriptor(f, true))); + } } #endif // defined(USE_LINUX_BREAKPAD) -- cgit v1.1