summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 22:40:46 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 22:40:46 +0000
commit4db3a01e07bc008b8a567c0735dbd813a49a617b (patch)
tree4a17c60743ce51c837306b29d4a74e83861a1562 /chrome/app
parentcd8796ee418ea05535a9928c5b3c3cdb12a31860 (diff)
downloadchromium_src-4db3a01e07bc008b8a567c0735dbd813a49a617b.zip
chromium_src-4db3a01e07bc008b8a567c0735dbd813a49a617b.tar.gz
chromium_src-4db3a01e07bc008b8a567c0735dbd813a49a617b.tar.bz2
Send browser crashes to Apple Crash Reporters.
Send crashes to Apple Crash Reporters so we get a nice UI to restart the Browser process if it crashes. BUG=9231 TEST=Induce a browser crash in a Chrome build, Apple Crash reporter UI should appear aftera few seconds. Induce a renderer crash, no UI should be displayed. Review URL: http://codereview.chromium.org/164433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/breakpad_mac.mm12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index 3307829..3bad98d 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -42,7 +42,8 @@ void InitCrashReporter() {
// Check for Send stats preference. If preference is not specifically turned
// on then disable crash reporting.
- if (!GoogleUpdateSettings::GetCollectStatsConsent()) {
+ bool user_consented = GoogleUpdateSettings::GetCollectStatsConsent();
+ if (!user_consented) {
LOG(WARNING) << "Breakpad disabled";
return;
}
@@ -68,6 +69,15 @@ void InitCrashReporter() {
[breakpad_config setObject:reporter_location
forKey:@BREAKPAD_REPORTER_EXE_LOCATION];
+ // Pass crash to Crash Reporter if we're a foreground application [the
+ // browser process]. This is so the user gets notification when Chrome
+ // crashes and also since we get "restart ui" for free.
+ BOOL is_background_app = [[info_dictionary objectForKey:@"LSUIElement"]
+ isEqualToString:@"1"];
+ if (!is_background_app) {
+ [breakpad_config setObject:@"NO" forKey:@BREAKPAD_SEND_AND_EXIT];
+ }
+
// Init breakpad
BreakpadRef breakpad = NULL;
breakpad = BreakpadCreate(breakpad_config);