| 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/policy/device_policy_decoder_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 if (container.has_transfer_saml_cookies()) { | 293 if (container.has_transfer_saml_cookies()) { |
| 294 policies->Set(key::kDeviceTransferSAMLCookies, | 294 policies->Set(key::kDeviceTransferSAMLCookies, |
| 295 POLICY_LEVEL_MANDATORY, | 295 POLICY_LEVEL_MANDATORY, |
| 296 POLICY_SCOPE_MACHINE, | 296 POLICY_SCOPE_MACHINE, |
| 297 POLICY_SOURCE_CLOUD, | 297 POLICY_SOURCE_CLOUD, |
| 298 new base::FundamentalValue( | 298 new base::FundamentalValue( |
| 299 container.transfer_saml_cookies()), | 299 container.transfer_saml_cookies()), |
| 300 NULL); | 300 NULL); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 |
| 304 if (policy.has_allow_bluetooth()) { |
| 305 const em::AllowBluetoothProto& container(policy.allow_bluetooth()); |
| 306 if (container.has_allow_bluetooth()) { |
| 307 policies->Set(key::kDeviceAllowBluetooth, POLICY_LEVEL_MANDATORY, |
| 308 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, |
| 309 new base::FundamentalValue(container.allow_bluetooth()), |
| 310 nullptr); |
| 311 } |
| 312 } |
| 303 } | 313 } |
| 304 | 314 |
| 305 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, | 315 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 306 PolicyMap* policies) { | 316 PolicyMap* policies) { |
| 307 if (policy.has_data_roaming_enabled()) { | 317 if (policy.has_data_roaming_enabled()) { |
| 308 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); | 318 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); |
| 309 if (container.has_data_roaming_enabled()) { | 319 if (container.has_data_roaming_enabled()) { |
| 310 policies->Set(key::kDeviceDataRoamingEnabled, | 320 policies->Set(key::kDeviceDataRoamingEnabled, |
| 311 POLICY_LEVEL_MANDATORY, | 321 POLICY_LEVEL_MANDATORY, |
| 312 POLICY_SCOPE_MACHINE, | 322 POLICY_SCOPE_MACHINE, |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 // Decode the various groups of policies. | 855 // Decode the various groups of policies. |
| 846 DecodeLoginPolicies(policy, policies); | 856 DecodeLoginPolicies(policy, policies); |
| 847 DecodeNetworkPolicies(policy, policies); | 857 DecodeNetworkPolicies(policy, policies); |
| 848 DecodeReportingPolicies(policy, policies); | 858 DecodeReportingPolicies(policy, policies); |
| 849 DecodeAutoUpdatePolicies(policy, policies); | 859 DecodeAutoUpdatePolicies(policy, policies); |
| 850 DecodeAccessibilityPolicies(policy, policies); | 860 DecodeAccessibilityPolicies(policy, policies); |
| 851 DecodeGenericPolicies(policy, policies); | 861 DecodeGenericPolicies(policy, policies); |
| 852 } | 862 } |
| 853 | 863 |
| 854 } // namespace policy | 864 } // namespace policy |
| OLD | NEW |