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 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 policy.login_screen_power_management()); | 703 policy.login_screen_power_management()); |
704 if (container.has_login_screen_power_management()) { | 704 if (container.has_login_screen_power_management()) { |
705 policies->Set(key::kDeviceLoginScreenPowerManagement, | 705 policies->Set(key::kDeviceLoginScreenPowerManagement, |
706 POLICY_LEVEL_MANDATORY, | 706 POLICY_LEVEL_MANDATORY, |
707 POLICY_SCOPE_MACHINE, | 707 POLICY_SCOPE_MACHINE, |
708 base::Value::CreateStringValue( | 708 base::Value::CreateStringValue( |
709 container.login_screen_power_management()), | 709 container.login_screen_power_management()), |
710 NULL); | 710 NULL); |
711 } | 711 } |
712 } | 712 } |
713 if (policy.has_auto_clean_up_settings()) { | |
714 const em::AutoCleanupSettigsProto& container( | |
715 policy.auto_clean_up_settings()); | |
716 if (container.has_clean_up_strategy()) { | |
717 policies->Set(key::kAutoCleanUpStrategy, | |
718 POLICY_LEVEL_MANDATORY, | |
719 POLICY_SCOPE_MACHINE, | |
720 base::Value::CreateStringValue( | |
721 container.clean_up_strategy()), | |
722 NULL); | |
723 } | |
724 } | |
725 } | 713 } |
726 | 714 |
727 } // namespace | 715 } // namespace |
728 | 716 |
729 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 717 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
730 PolicyMap* policies, | 718 PolicyMap* policies, |
731 EnterpriseInstallAttributes* install_attributes) { | 719 EnterpriseInstallAttributes* install_attributes) { |
732 // TODO(achuith): Remove this once crbug.com/263527 is resolved. | 720 // TODO(achuith): Remove this once crbug.com/263527 is resolved. |
733 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); | 721 VLOG(2) << "DecodeDevicePolicy " << policy.SerializeAsString(); |
734 | 722 |
735 // Decode the various groups of policies. | 723 // Decode the various groups of policies. |
736 DecodeLoginPolicies(policy, policies); | 724 DecodeLoginPolicies(policy, policies); |
737 DecodeKioskPolicies(policy, policies, install_attributes); | 725 DecodeKioskPolicies(policy, policies, install_attributes); |
738 DecodeNetworkPolicies(policy, policies, install_attributes); | 726 DecodeNetworkPolicies(policy, policies, install_attributes); |
739 DecodeReportingPolicies(policy, policies); | 727 DecodeReportingPolicies(policy, policies); |
740 DecodeAutoUpdatePolicies(policy, policies); | 728 DecodeAutoUpdatePolicies(policy, policies); |
741 DecodeAccessibilityPolicies(policy, policies); | 729 DecodeAccessibilityPolicies(policy, policies); |
742 DecodeGenericPolicies(policy, policies); | 730 DecodeGenericPolicies(policy, policies); |
743 } | 731 } |
744 | 732 |
745 } // namespace policy | 733 } // namespace policy |
OLD | NEW |