| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 kIdleLogoutTimeout, | 60 kIdleLogoutTimeout, |
| 61 kIdleLogoutWarningDuration, | 61 kIdleLogoutWarningDuration, |
| 62 kPolicyMissingMitigationMode, | 62 kPolicyMissingMitigationMode, |
| 63 kReleaseChannel, | 63 kReleaseChannel, |
| 64 kReleaseChannelDelegated, | 64 kReleaseChannelDelegated, |
| 65 kReportDeviceActivityTimes, | 65 kReportDeviceActivityTimes, |
| 66 kReportDeviceBootMode, | 66 kReportDeviceBootMode, |
| 67 kReportDeviceLocation, | 67 kReportDeviceLocation, |
| 68 kReportDeviceNetworkInterfaces, | 68 kReportDeviceNetworkInterfaces, |
| 69 kReportDeviceUsers, | 69 kReportDeviceUsers, |
| 70 kReportDeviceHardwareStatus, |
| 70 kReportDeviceVersionInfo, | 71 kReportDeviceVersionInfo, |
| 71 kScreenSaverExtensionId, | 72 kScreenSaverExtensionId, |
| 72 kScreenSaverTimeout, | 73 kScreenSaverTimeout, |
| 73 kServiceAccountIdentity, | 74 kServiceAccountIdentity, |
| 74 kSignedDataRoamingEnabled, | 75 kSignedDataRoamingEnabled, |
| 75 kStartUpFlags, | 76 kStartUpFlags, |
| 76 kStartUpUrls, | 77 kStartUpUrls, |
| 77 kStatsReportingPref, | 78 kStatsReportingPref, |
| 78 kSystemTimezonePolicy, | 79 kSystemTimezonePolicy, |
| 79 kSystemUse24HourClock, | 80 kSystemUse24HourClock, |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (reporting_policy.has_report_network_interfaces()) { | 361 if (reporting_policy.has_report_network_interfaces()) { |
| 361 new_values_cache->SetBoolean( | 362 new_values_cache->SetBoolean( |
| 362 kReportDeviceNetworkInterfaces, | 363 kReportDeviceNetworkInterfaces, |
| 363 reporting_policy.report_network_interfaces()); | 364 reporting_policy.report_network_interfaces()); |
| 364 } | 365 } |
| 365 if (reporting_policy.has_report_users()) { | 366 if (reporting_policy.has_report_users()) { |
| 366 new_values_cache->SetBoolean( | 367 new_values_cache->SetBoolean( |
| 367 kReportDeviceUsers, | 368 kReportDeviceUsers, |
| 368 reporting_policy.report_users()); | 369 reporting_policy.report_users()); |
| 369 } | 370 } |
| 371 if (reporting_policy.has_report_hardware_status()) { |
| 372 new_values_cache->SetBoolean( |
| 373 kReportDeviceHardwareStatus, |
| 374 reporting_policy.report_hardware_status()); |
| 375 } |
| 370 } | 376 } |
| 371 } | 377 } |
| 372 | 378 |
| 373 void DecodeGenericPolicies( | 379 void DecodeGenericPolicies( |
| 374 const em::ChromeDeviceSettingsProto& policy, | 380 const em::ChromeDeviceSettingsProto& policy, |
| 375 PrefValueMap* new_values_cache) { | 381 PrefValueMap* new_values_cache) { |
| 376 if (policy.has_metrics_enabled()) { | 382 if (policy.has_metrics_enabled()) { |
| 377 new_values_cache->SetBoolean(kStatsReportingPref, | 383 new_values_cache->SetBoolean(kStatsReportingPref, |
| 378 policy.metrics_enabled().metrics_enabled()); | 384 policy.metrics_enabled().metrics_enabled()); |
| 379 } else { | 385 } else { |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 void DeviceSettingsProvider::AttemptMigration() { | 824 void DeviceSettingsProvider::AttemptMigration() { |
| 819 if (device_settings_service_->HasPrivateOwnerKey()) { | 825 if (device_settings_service_->HasPrivateOwnerKey()) { |
| 820 PrefValueMap::const_iterator i; | 826 PrefValueMap::const_iterator i; |
| 821 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) | 827 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) |
| 822 DoSet(i->first, *i->second); | 828 DoSet(i->first, *i->second); |
| 823 migration_values_.Clear(); | 829 migration_values_.Clear(); |
| 824 } | 830 } |
| 825 } | 831 } |
| 826 | 832 |
| 827 } // namespace chromeos | 833 } // namespace chromeos |
| OLD | NEW |