summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/google_update_settings.cc2
-rw-r--r--chrome/browser/browser.cc1
-rw-r--r--chrome/browser/browser_main.cc3
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc2
4 files changed, 5 insertions, 3 deletions
diff --git a/chrome/app/google_update_settings.cc b/chrome/app/google_update_settings.cc
index c1b06aa..eb8eb4a 100644
--- a/chrome/app/google_update_settings.cc
+++ b/chrome/app/google_update_settings.cc
@@ -46,7 +46,7 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
RegKey key(HKEY_CURRENT_USER, kRegistryBase, KEY_READ);
DWORD value;
if (!key.ReadValueDW(kUsageStatsFlag, &value))
- return true;
+ return false;
return (1 == value);
}
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 5e4af3c..bc5ad30 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -188,7 +188,6 @@ void Browser::RegisterPrefs(PrefService* prefs) {
prefs->RegisterIntegerPref(prefs::kHungPluginDetectFrequency,
kDefaultHungPluginDetectFrequency);
prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
- prefs->RegisterBooleanPref(prefs::kMetricsReportingEnabled, true);
prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
}
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 21ab3ad..317ebed 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -294,6 +294,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command,
// 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);
// During first run we read the google update registry key to find what
// language the user selected when downloading the installer. This
@@ -302,6 +303,8 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command,
std::wstring install_lang;
if (GoogleUpdateSettings::GetLanguage(&install_lang))
local_state->SetString(prefs::kApplicationLocale, install_lang);
+ if (GoogleUpdateSettings::GetCollectStatsConsent())
+ local_state->SetBoolean(prefs::kMetricsReportingEnabled, true);
}
ResourceBundle::InitSharedInstance(
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index 32359a9..52ed1df 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -467,7 +467,7 @@ void GeneralSection::NotifyPrefChanged(const std::wstring* pref_name) {
reset_file_handlers_label_->SetEnabled(enabled);
reset_file_handlers_button_->SetEnabled(enabled);
}
- if (!pref_name ||*pref_name == prefs::kMetricsReportingEnabled) {
+ if (!pref_name || *pref_name == prefs::kMetricsReportingEnabled) {
bool enabled = enable_metrics_recording_.GetValue();
bool done = g_browser_process->metrics_service()->EnableReporting(enabled);
if (!done) {