| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 kAccountsPrefEphemeralUsersEnabled, | 49 kAccountsPrefEphemeralUsersEnabled, |
| 50 kAccountsPrefShowUserNamesOnSignIn, | 50 kAccountsPrefShowUserNamesOnSignIn, |
| 51 kAccountsPrefSupervisedUsersEnabled, | 51 kAccountsPrefSupervisedUsersEnabled, |
| 52 kAccountsPrefTransferSAMLCookies, | 52 kAccountsPrefTransferSAMLCookies, |
| 53 kAccountsPrefUsers, | 53 kAccountsPrefUsers, |
| 54 kAccountsPrefLoginScreenDomainAutoComplete, | 54 kAccountsPrefLoginScreenDomainAutoComplete, |
| 55 kAllowRedeemChromeOsRegistrationOffers, | 55 kAllowRedeemChromeOsRegistrationOffers, |
| 56 kAllowedConnectionTypesForUpdate, | 56 kAllowedConnectionTypesForUpdate, |
| 57 kAttestationForContentProtectionEnabled, | 57 kAttestationForContentProtectionEnabled, |
| 58 kDeviceAttestationEnabled, | 58 kDeviceAttestationEnabled, |
| 59 kDeviceDisabled, |
| 60 kDeviceDisabledMessage, |
| 59 kDeviceOwner, | 61 kDeviceOwner, |
| 62 kExtensionCacheSize, |
| 60 kHeartbeatEnabled, | 63 kHeartbeatEnabled, |
| 61 kHeartbeatFrequency, | 64 kHeartbeatFrequency, |
| 62 kPolicyMissingMitigationMode, | 65 kPolicyMissingMitigationMode, |
| 66 kRebootOnShutdown, |
| 63 kReleaseChannel, | 67 kReleaseChannel, |
| 64 kReleaseChannelDelegated, | 68 kReleaseChannelDelegated, |
| 65 kReportDeviceActivityTimes, | 69 kReportDeviceActivityTimes, |
| 66 kReportDeviceBootMode, | 70 kReportDeviceBootMode, |
| 67 kReportDeviceHardwareStatus, | 71 kReportDeviceHardwareStatus, |
| 68 kReportDeviceLocation, | 72 kReportDeviceLocation, |
| 69 kReportDeviceNetworkInterfaces, | 73 kReportDeviceNetworkInterfaces, |
| 70 kReportDeviceSessionStatus, | 74 kReportDeviceSessionStatus, |
| 71 kReportDeviceUsers, | 75 kReportDeviceUsers, |
| 72 kReportDeviceVersionInfo, | 76 kReportDeviceVersionInfo, |
| 73 kReportUploadFrequency, | 77 kReportUploadFrequency, |
| 74 kServiceAccountIdentity, | 78 kServiceAccountIdentity, |
| 75 kSignedDataRoamingEnabled, | 79 kSignedDataRoamingEnabled, |
| 76 kStartUpFlags, | 80 kStartUpFlags, |
| 77 kStatsReportingPref, | 81 kStatsReportingPref, |
| 78 kSystemTimezonePolicy, | 82 kSystemTimezonePolicy, |
| 79 kSystemUse24HourClock, | 83 kSystemUse24HourClock, |
| 80 kUpdateDisabled, | 84 kUpdateDisabled, |
| 81 kVariationsRestrictParameter, | 85 kVariationsRestrictParameter, |
| 82 kDeviceDisabled, | |
| 83 kDeviceDisabledMessage, | |
| 84 kRebootOnShutdown, | |
| 85 kExtensionCacheSize, | |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 bool HasOldMetricsFile() { | 88 bool HasOldMetricsFile() { |
| 89 // TODO(pastarmovj): Remove this once migration is not needed anymore. | 89 // TODO(pastarmovj): Remove this once migration is not needed anymore. |
| 90 // If the value is not set we should try to migrate legacy consent file. | 90 // If the value is not set we should try to migrate legacy consent file. |
| 91 // Loading consent file state causes us to do blocking IO on UI thread. | 91 // Loading consent file state causes us to do blocking IO on UI thread. |
| 92 // Temporarily allow it until we fix http://crbug.com/62626 | 92 // Temporarily allow it until we fix http://crbug.com/62626 |
| 93 base::ThreadRestrictions::ScopedAllowIO allow_io; | 93 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 94 return GoogleUpdateSettings::GetCollectStatsConsent(); | 94 return GoogleUpdateSettings::GetCollectStatsConsent(); |
| 95 } | 95 } |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 void DeviceSettingsProvider::AttemptMigration() { | 819 void DeviceSettingsProvider::AttemptMigration() { |
| 820 if (device_settings_service_->HasPrivateOwnerKey()) { | 820 if (device_settings_service_->HasPrivateOwnerKey()) { |
| 821 PrefValueMap::const_iterator i; | 821 PrefValueMap::const_iterator i; |
| 822 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) | 822 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) |
| 823 DoSet(i->first, *i->second); | 823 DoSet(i->first, *i->second); |
| 824 migration_values_.Clear(); | 824 migration_values_.Clear(); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 | 827 |
| 828 } // namespace chromeos | 828 } // namespace chromeos |
| OLD | NEW |