| 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 if (policy.has_auto_clean_up_settings()) { | |
| 773 const em::AutoCleanupSettigsProto& container( | |
| 774 policy.auto_clean_up_settings()); | |
| 775 if (container.has_clean_up_strategy()) { | |
| 776 policies->Set(key::kAutoCleanUpStrategy, | |
| 777 POLICY_LEVEL_MANDATORY, | |
| 778 POLICY_SCOPE_MACHINE, | |
| 779 new base::StringValue( | |
| 780 container.clean_up_strategy()), | |
| 781 NULL); | |
| 782 } | |
| 783 } | |
| 784 } | 772 } |
| 785 | 773 |
| 786 } // namespace | 774 } // namespace |
| 787 | 775 |
| 788 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 776 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
| 789 PolicyMap* policies, | 777 PolicyMap* policies, |
| 790 EnterpriseInstallAttributes* install_attributes) { | 778 EnterpriseInstallAttributes* install_attributes) { |
| 791 // TODO(achuith): Remove this once crbug.com/263527 is resolved. | 779 // TODO(achuith): Remove this once crbug.com/263527 is resolved. |
| 792 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); | 780 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); |
| 793 | 781 |
| 794 // Decode the various groups of policies. | 782 // Decode the various groups of policies. |
| 795 DecodeLoginPolicies(policy, policies); | 783 DecodeLoginPolicies(policy, policies); |
| 796 DecodeKioskPolicies(policy, policies, install_attributes); | 784 DecodeKioskPolicies(policy, policies, install_attributes); |
| 797 DecodeNetworkPolicies(policy, policies, install_attributes); | 785 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 798 DecodeReportingPolicies(policy, policies); | 786 DecodeReportingPolicies(policy, policies); |
| 799 DecodeAutoUpdatePolicies(policy, policies); | 787 DecodeAutoUpdatePolicies(policy, policies); |
| 800 DecodeAccessibilityPolicies(policy, policies); | 788 DecodeAccessibilityPolicies(policy, policies); |
| 801 DecodeGenericPolicies(policy, policies); | 789 DecodeGenericPolicies(policy, policies); |
| 802 } | 790 } |
| 803 | 791 |
| 804 } // namespace policy | 792 } // namespace policy |
| OLD | NEW |