Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: chrome/app/breakpad_mac.mm

Issue 164433: Send browser crashes to Apple Crash Reporters. (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698