summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_mac.mm
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 23:08:00 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 23:08:00 +0000
commit385f4973b13bcbd2deecfae311abfe10eaf3aee9 (patch)
tree0dd19b9e26444d691daef723df84ba3c2a44e491 /chrome/app/breakpad_mac.mm
parentda40d4ea45f0214f29480a37bf665192d694b957 (diff)
downloadchromium_src-385f4973b13bcbd2deecfae311abfe10eaf3aee9.zip
chromium_src-385f4973b13bcbd2deecfae311abfe10eaf3aee9.tar.gz
chromium_src-385f4973b13bcbd2deecfae311abfe10eaf3aee9.tar.bz2
Change when we enable Apple's Crash reporter.
Enable Apple Crash Reporter for Browser process in Non-Debug builds. * Introduce mac_util::IsBackgroundProcess(). * Invert logic around Breakpad Enabling/Disabling to make it clearer. * Honor the kDisableBreakpad switch. Our new policy: * Breakpad is enabled/disabled based on the user stats reporting opt-in flag - this hasn't changed. * Always disable Apple Crash in background processes (plug-in, renderer, etc). * If Breakpad is enabled browser crashes will be passed to Crash Reporter. * If Breakpad is NOT enabled browser [or any other foreground app] crashes will be passed to Crash Reporter in Release builds. Effectively this means that we now enable Crash Reporter for the browser process in Chromium release builds so these will no longer crash silently with no trace. Review URL: http://codereview.chromium.org/180048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad_mac.mm')
-rw-r--r--chrome/app/breakpad_mac.mm11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index 6acb3f4..d295d43 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -24,8 +24,8 @@ BreakpadRef gBreakpadRef = NULL;
} // namespace
-bool IsCrashReporterDisabled() {
- return gBreakpadRef == NULL;
+bool IsCrashReporterEnabled() {
+ return gBreakpadRef != NULL;
}
void DestructCrashReporter() {
@@ -47,13 +47,16 @@ void InitCrashReporter() {
// command line.
NSBundle* main_bundle = mac_util::MainAppBundle();
NSDictionary* info_dictionary = [main_bundle infoDictionary];
- bool is_browser = [[info_dictionary objectForKey:@"LSUIElement"]
- isEqualToString:@"1"] ? false : true;
+ bool is_browser = !mac_util::IsBackgroundOnlyProcess();
bool enable_breakpad =
is_browser ? GoogleUpdateSettings::GetCollectStatsConsent() :
CommandLine::ForCurrentProcess()->
HasSwitch(switches::kEnableCrashReporter);
+ if (parsed_command_line.HasSwitch(switches::kDisableBreakpad)) {
+ enable_breakpad = false;
+ }
+
if (!enable_breakpad) {
LOG(WARNING) << "Breakpad disabled";
return;