From 385f4973b13bcbd2deecfae311abfe10eaf3aee9 Mon Sep 17 00:00:00 2001 From: "jeremy@chromium.org" Date: Mon, 31 Aug 2009 23:08:00 +0000 Subject: 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 --- base/mac_util.mm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'base/mac_util.mm') diff --git a/base/mac_util.mm b/base/mac_util.mm index 6711257..b2e9b6e 100644 --- a/base/mac_util.mm +++ b/base/mac_util.mm @@ -43,6 +43,13 @@ bool AmIBundled() { return info.nodeFlags & kFSNodeIsDirectoryMask; } +bool IsBackgroundOnlyProcess() { + NSBundle* main_bundle = MainAppBundle(); + NSDictionary* info_dictionary = [main_bundle infoDictionary]; + return [[info_dictionary objectForKey:@"LSUIElement"] + isEqualToString:@"1"] ? true : false; +} + // No threading worries since NSBundle isn't thread safe. static NSBundle* g_override_app_bundle = nil; -- cgit v1.1