| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, | 49 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, |
| 50 kAccountsPrefDeviceLocalAccountAutoLoginDelay, | 50 kAccountsPrefDeviceLocalAccountAutoLoginDelay, |
| 51 kAccountsPrefDeviceLocalAccountAutoLoginId, | 51 kAccountsPrefDeviceLocalAccountAutoLoginId, |
| 52 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline, | 52 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline, |
| 53 kAccountsPrefEphemeralUsersEnabled, | 53 kAccountsPrefEphemeralUsersEnabled, |
| 54 kAccountsPrefShowUserNamesOnSignIn, | 54 kAccountsPrefShowUserNamesOnSignIn, |
| 55 kAccountsPrefSupervisedUsersEnabled, | 55 kAccountsPrefSupervisedUsersEnabled, |
| 56 kAccountsPrefTransferSAMLCookies, | 56 kAccountsPrefTransferSAMLCookies, |
| 57 kAccountsPrefUsers, | 57 kAccountsPrefUsers, |
| 58 kAccountsPrefLoginScreenDomainAutoComplete, | 58 kAccountsPrefLoginScreenDomainAutoComplete, |
| 59 kAllowBluetooth, |
| 59 kAllowRedeemChromeOsRegistrationOffers, | 60 kAllowRedeemChromeOsRegistrationOffers, |
| 60 kAllowedConnectionTypesForUpdate, | 61 kAllowedConnectionTypesForUpdate, |
| 61 kAttestationForContentProtectionEnabled, | 62 kAttestationForContentProtectionEnabled, |
| 62 kDeviceAttestationEnabled, | 63 kDeviceAttestationEnabled, |
| 63 kDeviceDisabled, | 64 kDeviceDisabled, |
| 64 kDeviceDisabledMessage, | 65 kDeviceDisabledMessage, |
| 65 kDeviceOwner, | 66 kDeviceOwner, |
| 66 kAllowBluetooth, | 67 kDeviceQuirksDownloadEnabled, |
| 67 kDisplayRotationDefault, | 68 kDisplayRotationDefault, |
| 68 kExtensionCacheSize, | 69 kExtensionCacheSize, |
| 69 kHeartbeatEnabled, | 70 kHeartbeatEnabled, |
| 70 kHeartbeatFrequency, | 71 kHeartbeatFrequency, |
| 71 kLoginAuthenticationBehavior, | 72 kLoginAuthenticationBehavior, |
| 72 kPolicyMissingMitigationMode, | 73 kPolicyMissingMitigationMode, |
| 73 kRebootOnShutdown, | 74 kRebootOnShutdown, |
| 74 kReleaseChannel, | 75 kReleaseChannel, |
| 75 kReleaseChannelDelegated, | 76 kReleaseChannelDelegated, |
| 76 kReportDeviceActivityTimes, | 77 kReportDeviceActivityTimes, |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 policy.display_rotation_default().has_display_rotation_default()) { | 453 policy.display_rotation_default().has_display_rotation_default()) { |
| 453 new_values_cache->SetInteger( | 454 new_values_cache->SetInteger( |
| 454 kDisplayRotationDefault, | 455 kDisplayRotationDefault, |
| 455 policy.display_rotation_default().display_rotation_default()); | 456 policy.display_rotation_default().display_rotation_default()); |
| 456 } | 457 } |
| 457 | 458 |
| 458 new_values_cache->SetBoolean( | 459 new_values_cache->SetBoolean( |
| 459 kAllowBluetooth, policy.has_allow_bluetooth() && | 460 kAllowBluetooth, policy.has_allow_bluetooth() && |
| 460 policy.allow_bluetooth().has_allow_bluetooth() && | 461 policy.allow_bluetooth().has_allow_bluetooth() && |
| 461 policy.allow_bluetooth().allow_bluetooth()); | 462 policy.allow_bluetooth().allow_bluetooth()); |
| 463 |
| 464 if (policy.has_quirks_download_enabled() && |
| 465 policy.quirks_download_enabled().has_quirks_download_enabled()) { |
| 466 new_values_cache->SetBoolean( |
| 467 kDeviceQuirksDownloadEnabled, |
| 468 policy.quirks_download_enabled().quirks_download_enabled()); |
| 469 } |
| 462 } | 470 } |
| 463 | 471 |
| 464 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, | 472 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 465 PrefValueMap* new_values_cache) { | 473 PrefValueMap* new_values_cache) { |
| 466 if (!policy.has_device_log_upload_settings()) | 474 if (!policy.has_device_log_upload_settings()) |
| 467 return; | 475 return; |
| 468 | 476 |
| 469 const em::DeviceLogUploadSettingsProto& log_upload_policy = | 477 const em::DeviceLogUploadSettingsProto& log_upload_policy = |
| 470 policy.device_log_upload_settings(); | 478 policy.device_log_upload_settings(); |
| 471 if (log_upload_policy.has_system_log_upload_enabled()) { | 479 if (log_upload_policy.has_system_log_upload_enabled()) { |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 // Notify the observers we are done. | 812 // Notify the observers we are done. |
| 805 std::vector<base::Closure> callbacks; | 813 std::vector<base::Closure> callbacks; |
| 806 callbacks.swap(callbacks_); | 814 callbacks.swap(callbacks_); |
| 807 for (size_t i = 0; i < callbacks.size(); ++i) | 815 for (size_t i = 0; i < callbacks.size(); ++i) |
| 808 callbacks[i].Run(); | 816 callbacks[i].Run(); |
| 809 | 817 |
| 810 return settings_loaded; | 818 return settings_loaded; |
| 811 } | 819 } |
| 812 | 820 |
| 813 } // namespace chromeos | 821 } // namespace chromeos |
| OLD | NEW |