summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
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);