summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_mac.mm
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 21:51:46 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 21:51:46 +0000
commitd60d538ef237355a9670aac5b901f3ed9a4151d0 (patch)
treef2ebc5c399721b269554cca1645d88d83bb8c50e /chrome/app/breakpad_mac.mm
parent099eaf0cd8ed17455d3f6a5ee88ed2783b454971 (diff)
downloadchromium_src-d60d538ef237355a9670aac5b901f3ed9a4151d0.zip
chromium_src-d60d538ef237355a9670aac5b901f3ed9a4151d0.tar.gz
chromium_src-d60d538ef237355a9670aac5b901f3ed9a4151d0.tar.bz2
Mac: Enable Breakpad when CHROME_HEADLESS is set.
BUG=57189 TEST=none Review URL: http://codereview.chromium.org/3534001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad_mac.mm')
-rw-r--r--chrome/app/breakpad_mac.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index 283a56d..dc9c1ad 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -22,6 +22,7 @@
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/env_vars.h"
#include "chrome/common/policy_constants.h"
#include "chrome/installer/util/google_update_settings.h"
@@ -72,9 +73,12 @@ void InitCrashReporter() {
// Controlled by configuration manangement.
enable_breakpad = metrics_reporting_enabled;
} else {
- // Controlled by the user.
- enable_breakpad = GoogleUpdateSettings::GetCollectStatsConsent() &&
- !command_line->HasSwitch(switches::kDisableBreakpad);
+ // Controlled by the user. The crash reporter may be enabled by
+ // preference or through an environment variable, but the kDisableBreakpad
+ // switch overrides both.
+ enable_breakpad = GoogleUpdateSettings::GetCollectStatsConsent() ||
+ getenv(env_vars::kHeadless) != NULL;
+ enable_breakpad &= !command_line->HasSwitch(switches::kDisableBreakpad);
}
} else {
// This is a helper process, check the command line switch.