summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 05:28:21 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 05:28:21 +0000
commitc38a0c74b4a29e6eecb99babf7c98045f05c1c56 (patch)
treeb22d16943cdf64b5ccebb946f00283f3fcf57497 /chrome
parent5f2cee8b6e2760e626646651556a808a4cd5a6b1 (diff)
downloadchromium_src-c38a0c74b4a29e6eecb99babf7c98045f05c1c56.zip
chromium_src-c38a0c74b4a29e6eecb99babf7c98045f05c1c56.tar.gz
chromium_src-c38a0c74b4a29e6eecb99babf7c98045f05c1c56.tar.bz2
Always enable Breakpad if using --enable-crash-reporter flag
This is so that when unattended, typically the first run dialog is not shown (when using automation proxy) and the user does not get a chance to consent to sending stats. This gives an opportunity to force enable breakpad. BUG=24960,25271 TEST=Breakpad should be initialized if --enable-crash-reporter flag has been specified Review URL: http://codereview.chromium.org/282011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/google_update_settings_posix.cc9
-rw-r--r--chrome/common/chrome_switches.cc2
2 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/google_update_settings_posix.cc b/chrome/browser/google_update_settings_posix.cc
index bc35bbc..defe492 100644
--- a/chrome/browser/google_update_settings_posix.cc
+++ b/chrome/browser/google_update_settings_posix.cc
@@ -4,12 +4,14 @@
#include "chrome/installer/util/google_update_settings.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/rand_util.h"
#include "base/string_util.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#if !defined(OS_MACOSX)
namespace google_update {
@@ -23,6 +25,8 @@ static const int kGuidLen = sizeof(uint64) * 4; // 128 bits -> 32 bytes hex.
// static
bool GoogleUpdateSettings::GetCollectStatsConsent() {
+ bool forced_enable = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kEnableCrashReporter);
#if defined(OS_MACOSX)
std::string linux_guid;
#else
@@ -31,10 +35,9 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
FilePath consent_file;
PathService::Get(chrome::DIR_USER_DATA, &consent_file);
consent_file = consent_file.Append(kConsentToSendStats);
- bool r = file_util::ReadFileToString(consent_file,
- &linux_guid);
+ bool consented = file_util::ReadFileToString(consent_file, &linux_guid);
linux_guid.resize(kGuidLen, '0');
- return r;
+ return forced_enable || consented;
}
// static
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index c38bcfa..121feba 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -655,6 +655,8 @@ const char kAutoSSLClientAuth[] = "auto-ssl-client-auth";
// command lines on Linux and Mac. It tells the helper process to enable crash
// dumping and reporting, because helpers cannot access the profile or other
// files needed to make this decision.
+// If passed to the browser, it'll be passed on to all the helper processes
+// as well, thereby force-enabling the crash reporter.
const char kEnableCrashReporter[] = "enable-crash-reporter";
// This switch is used during automated testing.