Chromium Code Reviews| Index: chrome/app/breakpad_mac.mm |
| diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm |
| index 33078295369278e586da15207e3fa552d7d10873..3bad98ddf29d773c51cc3b785f22f5fb072de793 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]; |
|
John Grabowski
2009/08/12 22:38:25
Are you sure this is @"NO" and not [NSNumber numbe
|
| + } |
| + |
| // Init breakpad |
| BreakpadRef breakpad = NULL; |
| breakpad = BreakpadCreate(breakpad_config); |