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

Unified Diff: chrome/browser/browser_main.cc

Issue 5160003: Restoring check for CHROME_HEADLESS environment variable when initializing BreakPad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 5fa4a2a23a1da59a435276a976fb3681644616cc..3416d3306a60d0192c2701b2fe35f7403bb8ac87 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -981,13 +981,15 @@ DLLEXPORT void __cdecl RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
#if defined(USE_LINUX_BREAKPAD)
bool IsMetricsReportingEnabled(const PrefService* local_state) {
// Check whether we should initialize the crash reporter. It may be disabled
- // through configuration policy or user preference. The kHeadless environment
- // variable overrides the decision, but only if the crash service is under
- // control of the user. The CHROME_HEADLESS environment variable is used by QA
- // testing infrastructure to switch on generation of crash reports.
+ // through configuration policy or user preference.
+ // The kHeadless environment variable overrides the decision, but only if the
+ // crash service is under control of the user. It is used by QA testing
+ // infrastructure to switch on generation of crash reports.
#if defined(OS_CHROMEOS)
bool breakpad_enabled =
chromeos::MetricsCrosSettingsProvider::GetMetricsStatus();
+ if (!breakpad_enabled)
+ breakpad_enabled = getenv(env_vars::kHeadless) != NULL;
#else
const PrefService::Preference* metrics_reporting_enabled =
local_state->FindPreference(prefs::kMetricsReportingEnabled);
« 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