Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify a bit. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline, 48 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline,
49 kAccountsPrefEphemeralUsersEnabled, 49 kAccountsPrefEphemeralUsersEnabled,
50 kAccountsPrefShowUserNamesOnSignIn, 50 kAccountsPrefShowUserNamesOnSignIn,
51 kAccountsPrefSupervisedUsersEnabled, 51 kAccountsPrefSupervisedUsersEnabled,
52 kAccountsPrefTransferSAMLCookies, 52 kAccountsPrefTransferSAMLCookies,
53 kAccountsPrefUsers, 53 kAccountsPrefUsers,
54 kAllowRedeemChromeOsRegistrationOffers, 54 kAllowRedeemChromeOsRegistrationOffers,
55 kAllowedConnectionTypesForUpdate, 55 kAllowedConnectionTypesForUpdate,
56 kAttestationForContentProtectionEnabled, 56 kAttestationForContentProtectionEnabled,
57 kDeviceAttestationEnabled, 57 kDeviceAttestationEnabled,
58 kDeviceDisabled,
59 kDeviceDisabledMessage,
58 kDeviceOwner, 60 kDeviceOwner,
61 kExtensionCacheSize,
59 kHeartbeatEnabled, 62 kHeartbeatEnabled,
60 kHeartbeatFrequency, 63 kHeartbeatFrequency,
61 kPolicyMissingMitigationMode, 64 kPolicyMissingMitigationMode,
65 kRebootOnShutdown,
62 kReleaseChannel, 66 kReleaseChannel,
63 kReleaseChannelDelegated, 67 kReleaseChannelDelegated,
64 kReportDeviceActivityTimes, 68 kReportDeviceActivityTimes,
65 kReportDeviceBootMode, 69 kReportDeviceBootMode,
66 kReportDeviceHardwareStatus, 70 kReportDeviceHardwareStatus,
67 kReportDeviceLocation, 71 kReportDeviceLocation,
68 kReportDeviceNetworkInterfaces, 72 kReportDeviceNetworkInterfaces,
69 kReportDeviceSessionStatus, 73 kReportDeviceSessionStatus,
70 kReportDeviceUsers, 74 kReportDeviceUsers,
71 kReportDeviceVersionInfo, 75 kReportDeviceVersionInfo,
72 kReportUploadFrequency, 76 kReportUploadFrequency,
73 kServiceAccountIdentity, 77 kServiceAccountIdentity,
74 kSignedDataRoamingEnabled, 78 kSignedDataRoamingEnabled,
75 kStartUpFlags, 79 kStartUpFlags,
76 kStatsReportingPref, 80 kStatsReportingPref,
77 kSystemTimezonePolicy, 81 kSystemTimezonePolicy,
78 kSystemUse24HourClock, 82 kSystemUse24HourClock,
79 kUpdateDisabled, 83 kUpdateDisabled,
80 kVariationsRestrictParameter, 84 kVariationsRestrictParameter,
81 kDeviceDisabled,
82 kDeviceDisabledMessage,
83 kRebootOnShutdown,
84 kExtensionCacheSize,
85 }; 85 };
86 86
87 bool HasOldMetricsFile() { 87 bool HasOldMetricsFile() {
88 // TODO(pastarmovj): Remove this once migration is not needed anymore. 88 // TODO(pastarmovj): Remove this once migration is not needed anymore.
89 // If the value is not set we should try to migrate legacy consent file. 89 // If the value is not set we should try to migrate legacy consent file.
90 // Loading consent file state causes us to do blocking IO on UI thread. 90 // Loading consent file state causes us to do blocking IO on UI thread.
91 // Temporarily allow it until we fix http://crbug.com/62626 91 // Temporarily allow it until we fix http://crbug.com/62626
92 base::ThreadRestrictions::ScopedAllowIO allow_io; 92 base::ThreadRestrictions::ScopedAllowIO allow_io;
93 return GoogleUpdateSettings::GetCollectStatsConsent(); 93 return GoogleUpdateSettings::GetCollectStatsConsent();
94 } 94 }
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 void DeviceSettingsProvider::AttemptMigration() { 804 void DeviceSettingsProvider::AttemptMigration() {
805 if (device_settings_service_->HasPrivateOwnerKey()) { 805 if (device_settings_service_->HasPrivateOwnerKey()) {
806 PrefValueMap::const_iterator i; 806 PrefValueMap::const_iterator i;
807 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) 807 for (i = migration_values_.begin(); i != migration_values_.end(); ++i)
808 DoSet(i->first, *i->second); 808 DoSet(i->first, *i->second);
809 migration_values_.Clear(); 809 migration_values_.Clear();
810 } 810 }
811 } 811 }
812 812
813 } // namespace chromeos 813 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698