diff options
author | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 15:29:33 +0000 |
---|---|---|
committer | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 15:29:33 +0000 |
commit | 22ffb71cc098afc4c23b9f45954029f7c1d5a445 (patch) | |
tree | e4230df13ee2169fe98cc791c32e98f20dcd3d41 /chrome | |
parent | 603b356d096968ed5957dcfa42c504896f4b7bd3 (diff) | |
download | chromium_src-22ffb71cc098afc4c23b9f45954029f7c1d5a445.zip chromium_src-22ffb71cc098afc4c23b9f45954029f7c1d5a445.tar.gz chromium_src-22ffb71cc098afc4c23b9f45954029f7c1d5a445.tar.bz2 |
Changes the initialization of enabling the reporting metrics to initialize from registry settings first, rather than defaulting to Local State.
R=cpu,kuchhal
TEST=Turn on usagestats in options, close chrome, set usagestats off in registry, restart and verify it is turned OFF in options.
BUG=7547
Review URL: http://codereview.chromium.org/295035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_main.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index d8809f6..8485eaf 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -408,7 +408,8 @@ int BrowserMain(const MainFunctionParams& parameters) { // sources. This has to be done before uninstall code path and before prefs // are registered. local_state->RegisterStringPref(prefs::kApplicationLocale, L""); - local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); + local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, + GoogleUpdateSettings::GetCollectStatsConsent()); #if defined(TOOLKIT_GTK) // It is important for this to happen before the first run dialog, as it @@ -432,8 +433,6 @@ int BrowserMain(const MainFunctionParams& parameters) { if (GoogleUpdateSettings::GetLanguage(&install_lang)) local_state->SetString(prefs::kApplicationLocale, install_lang); #endif // defined(OS_WIN) - if (GoogleUpdateSettings::GetCollectStatsConsent()) - local_state->SetBoolean(prefs::kMetricsReportingEnabled, true); } // If the local state file for the current profile doesn't exist and the |