| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 kAccountsPrefTransferSAMLCookies, | 56 kAccountsPrefTransferSAMLCookies, |
| 57 kAccountsPrefUsers, | 57 kAccountsPrefUsers, |
| 58 kAccountsPrefLoginScreenDomainAutoComplete, | 58 kAccountsPrefLoginScreenDomainAutoComplete, |
| 59 kAllowRedeemChromeOsRegistrationOffers, | 59 kAllowRedeemChromeOsRegistrationOffers, |
| 60 kAllowedConnectionTypesForUpdate, | 60 kAllowedConnectionTypesForUpdate, |
| 61 kAttestationForContentProtectionEnabled, | 61 kAttestationForContentProtectionEnabled, |
| 62 kDeviceAttestationEnabled, | 62 kDeviceAttestationEnabled, |
| 63 kDeviceDisabled, | 63 kDeviceDisabled, |
| 64 kDeviceDisabledMessage, | 64 kDeviceDisabledMessage, |
| 65 kDeviceOwner, | 65 kDeviceOwner, |
| 66 kAllowBluetooth, |
| 66 kDisplayRotationDefault, | 67 kDisplayRotationDefault, |
| 67 kExtensionCacheSize, | 68 kExtensionCacheSize, |
| 68 kHeartbeatEnabled, | 69 kHeartbeatEnabled, |
| 69 kHeartbeatFrequency, | 70 kHeartbeatFrequency, |
| 70 kSystemLogUploadEnabled, | 71 kSystemLogUploadEnabled, |
| 71 kPolicyMissingMitigationMode, | 72 kPolicyMissingMitigationMode, |
| 72 kRebootOnShutdown, | 73 kRebootOnShutdown, |
| 73 kReleaseChannel, | 74 kReleaseChannel, |
| 74 kReleaseChannelDelegated, | 75 kReleaseChannelDelegated, |
| 75 kReportDeviceActivityTimes, | 76 kReportDeviceActivityTimes, |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 kExtensionCacheSize, | 438 kExtensionCacheSize, |
| 438 policy.extension_cache_size().extension_cache_size()); | 439 policy.extension_cache_size().extension_cache_size()); |
| 439 } | 440 } |
| 440 | 441 |
| 441 if (policy.has_display_rotation_default() && | 442 if (policy.has_display_rotation_default() && |
| 442 policy.display_rotation_default().has_display_rotation_default()) { | 443 policy.display_rotation_default().has_display_rotation_default()) { |
| 443 new_values_cache->SetInteger( | 444 new_values_cache->SetInteger( |
| 444 kDisplayRotationDefault, | 445 kDisplayRotationDefault, |
| 445 policy.display_rotation_default().display_rotation_default()); | 446 policy.display_rotation_default().display_rotation_default()); |
| 446 } | 447 } |
| 448 |
| 449 new_values_cache->SetBoolean( |
| 450 kAllowBluetooth, policy.has_allow_bluetooth() && |
| 451 policy.allow_bluetooth().has_allow_bluetooth() && |
| 452 policy.allow_bluetooth().allow_bluetooth()); |
| 447 } | 453 } |
| 448 | 454 |
| 449 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, | 455 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 450 PrefValueMap* new_values_cache) { | 456 PrefValueMap* new_values_cache) { |
| 451 if (!policy.has_device_log_upload_settings()) | 457 if (!policy.has_device_log_upload_settings()) |
| 452 return; | 458 return; |
| 453 | 459 |
| 454 const em::DeviceLogUploadSettingsProto& log_upload_policy = | 460 const em::DeviceLogUploadSettingsProto& log_upload_policy = |
| 455 policy.device_log_upload_settings(); | 461 policy.device_log_upload_settings(); |
| 456 if (log_upload_policy.has_system_log_upload_enabled()) { | 462 if (log_upload_policy.has_system_log_upload_enabled()) { |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // Notify the observers we are done. | 795 // Notify the observers we are done. |
| 790 std::vector<base::Closure> callbacks; | 796 std::vector<base::Closure> callbacks; |
| 791 callbacks.swap(callbacks_); | 797 callbacks.swap(callbacks_); |
| 792 for (size_t i = 0; i < callbacks.size(); ++i) | 798 for (size_t i = 0; i < callbacks.size(); ++i) |
| 793 callbacks[i].Run(); | 799 callbacks[i].Run(); |
| 794 | 800 |
| 795 return settings_loaded; | 801 return settings_loaded; |
| 796 } | 802 } |
| 797 | 803 |
| 798 } // namespace chromeos | 804 } // namespace chromeos |
| OLD | NEW |