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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 key::kDeviceLoginScreenPowerManagement); | 762 key::kDeviceLoginScreenPowerManagement); |
763 if (decoded_json) { | 763 if (decoded_json) { |
764 policies->Set(key::kDeviceLoginScreenPowerManagement, | 764 policies->Set(key::kDeviceLoginScreenPowerManagement, |
765 POLICY_LEVEL_MANDATORY, | 765 POLICY_LEVEL_MANDATORY, |
766 POLICY_SCOPE_MACHINE, | 766 POLICY_SCOPE_MACHINE, |
767 decoded_json.release(), | 767 decoded_json.release(), |
768 NULL); | 768 NULL); |
769 } | 769 } |
770 } | 770 } |
771 } | 771 } |
| 772 |
| 773 if (policy.has_system_settings()) { |
| 774 const em::SystemSettingsProto& container(policy.system_settings()); |
| 775 if (container.has_block_devmode()) { |
| 776 policies->Set( |
| 777 key::kDeviceBlockDevmode, |
| 778 POLICY_LEVEL_MANDATORY, |
| 779 POLICY_SCOPE_MACHINE, |
| 780 new base::FundamentalValue(container.block_devmode()), |
| 781 NULL); |
| 782 } |
| 783 } |
772 } | 784 } |
773 | 785 |
774 } // namespace | 786 } // namespace |
775 | 787 |
776 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 788 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
777 PolicyMap* policies, | 789 PolicyMap* policies, |
778 EnterpriseInstallAttributes* install_attributes) { | 790 EnterpriseInstallAttributes* install_attributes) { |
779 // TODO(achuith): Remove this once crbug.com/263527 is resolved. | 791 // TODO(achuith): Remove this once crbug.com/263527 is resolved. |
780 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); | 792 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); |
781 | 793 |
782 // Decode the various groups of policies. | 794 // Decode the various groups of policies. |
783 DecodeLoginPolicies(policy, policies); | 795 DecodeLoginPolicies(policy, policies); |
784 DecodeKioskPolicies(policy, policies, install_attributes); | 796 DecodeKioskPolicies(policy, policies, install_attributes); |
785 DecodeNetworkPolicies(policy, policies, install_attributes); | 797 DecodeNetworkPolicies(policy, policies, install_attributes); |
786 DecodeReportingPolicies(policy, policies); | 798 DecodeReportingPolicies(policy, policies); |
787 DecodeAutoUpdatePolicies(policy, policies); | 799 DecodeAutoUpdatePolicies(policy, policies); |
788 DecodeAccessibilityPolicies(policy, policies); | 800 DecodeAccessibilityPolicies(policy, policies); |
789 DecodeGenericPolicies(policy, policies); | 801 DecodeGenericPolicies(policy, policies); |
790 } | 802 } |
791 | 803 |
792 } // namespace policy | 804 } // namespace policy |
OLD | NEW |