| Index: chrome/browser/chromeos/user_cros_settings_provider.cc
|
| ===================================================================
|
| --- chrome/browser/chromeos/user_cros_settings_provider.cc (revision 94787)
|
| +++ chrome/browser/chromeos/user_cros_settings_provider.cc (working copy)
|
| @@ -24,8 +24,6 @@
|
| #include "chrome/browser/policy/browser_policy_connector.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/prefs/scoped_user_pref_update.h"
|
| -#include "chrome/browser/ui/options/options_util.h"
|
| -#include "chrome/installer/util/google_update_settings.h"
|
| #include "content/browser/browser_thread.h"
|
|
|
| namespace chromeos {
|
| @@ -44,7 +42,6 @@
|
| kAccountsPrefAllowGuest,
|
| kAccountsPrefShowUserNamesOnSignIn,
|
| kSignedDataRoamingEnabled,
|
| - kStatsReportingPref
|
| };
|
|
|
| const char* kStringSettings[] = {
|
| @@ -63,8 +60,7 @@
|
| return (pref_path == kAccountsPrefAllowNewUser) ||
|
| (pref_path == kAccountsPrefAllowGuest) ||
|
| (pref_path == kAccountsPrefShowUserNamesOnSignIn) ||
|
| - (pref_path == kSignedDataRoamingEnabled) ||
|
| - (pref_path == kStatsReportingPref);
|
| + (pref_path == kSignedDataRoamingEnabled);
|
| }
|
|
|
| bool IsControlledStringSetting(const std::string& pref_path) {
|
| @@ -86,8 +82,7 @@
|
| false,
|
| PrefService::UNSYNCABLE_PREF);
|
| if (IsControlledBooleanSetting(pref_path)) {
|
| - if (pref_path == kSignedDataRoamingEnabled ||
|
| - pref_path == kStatsReportingPref)
|
| + if (pref_path == kSignedDataRoamingEnabled)
|
| local_state->RegisterBooleanPref(pref_path.c_str(),
|
| false,
|
| PrefService::UNSYNCABLE_PREF);
|
| @@ -291,10 +286,6 @@
|
|
|
| NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
|
| cros->SetCellularDataRoamingAllowed(new_value);
|
| - } else if (path == kStatsReportingPref) {
|
| - // TODO(pastarmovj): Remove this once we don't need to regenerate the
|
| - // consent file for the GUID anymore.
|
| - OptionsUtil::ResolveMetricsReportingEnabled(new_value);
|
| }
|
| }
|
|
|
| @@ -314,13 +305,6 @@
|
| if (device_value != new_value)
|
| cros->SetCellularDataRoamingAllowed(new_value);
|
| }
|
| - } else if (path == kStatsReportingPref) {
|
| - bool stats_consent = (use_value == USE_VALUE_SUPPLIED) ? value : false;
|
| - // TODO(pastarmovj): Remove this once we don't need to regenerate the
|
| - // consent file for the GUID anymore.
|
| - VLOG(1) << "Metrics policy is being set to : " << stats_consent
|
| - << "(reason : " << use_value << ")";
|
| - OptionsUtil::ResolveMetricsReportingEnabled(stats_consent);
|
| }
|
| }
|
|
|
| @@ -504,11 +488,6 @@
|
| kDeviceOwner, callback);
|
| }
|
|
|
| -bool UserCrosSettingsProvider::RequestTrustedReportingEnabled(Task* callback) {
|
| - return UserCrosSettingsTrust::GetInstance()->RequestTrustedEntity(
|
| - kStatsReportingPref, callback);
|
| -}
|
| -
|
| void UserCrosSettingsProvider::Reload() {
|
| UserCrosSettingsTrust::GetInstance()->Reload();
|
| }
|
| @@ -545,14 +524,6 @@
|
| }
|
|
|
| // static
|
| -bool UserCrosSettingsProvider::cached_reporting_enabled() {
|
| - // Trigger prefetching if singleton object still does not exist.
|
| - UserCrosSettingsTrust::GetInstance();
|
| - return g_browser_process->local_state()->GetBoolean(
|
| - kStatsReportingPref);
|
| -}
|
| -
|
| -// static
|
| const ListValue* UserCrosSettingsProvider::cached_whitelist() {
|
| PrefService* prefs = g_browser_process->local_state();
|
| const ListValue* cached_users = prefs->GetList(kAccountsPrefUsers);
|
| @@ -626,7 +597,6 @@
|
| bool UserCrosSettingsProvider::HandlesSetting(const std::string& path) {
|
| return ::StartsWithASCII(path, "cros.accounts.", true) ||
|
| ::StartsWithASCII(path, "cros.signed.", true) ||
|
| - ::StartsWithASCII(path, "cros.metrics.", true) ||
|
| path == kReleaseChannel;
|
| }
|
|
|
|
|