| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 if (policy.has_attestation_settings()) { | 623 if (policy.has_attestation_settings()) { |
| 624 if (policy.attestation_settings().has_attestation_enabled()) { | 624 if (policy.attestation_settings().has_attestation_enabled()) { |
| 625 policies->Set(key::kAttestationEnabledForDevice, | 625 policies->Set(key::kAttestationEnabledForDevice, |
| 626 POLICY_LEVEL_MANDATORY, | 626 POLICY_LEVEL_MANDATORY, |
| 627 POLICY_SCOPE_MACHINE, | 627 POLICY_SCOPE_MACHINE, |
| 628 Value::CreateBooleanValue( | 628 Value::CreateBooleanValue( |
| 629 policy.attestation_settings().attestation_enabled()), | 629 policy.attestation_settings().attestation_enabled()), |
| 630 NULL); | 630 NULL); |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 |
| 634 if (policy.has_login_screen_power_management()) { |
| 635 const em::LoginScreenPowerManagementProto& container( |
| 636 policy.login_screen_power_management()); |
| 637 if (container.has_login_screen_power_management()) { |
| 638 policies->Set(key::kDeviceLoginScreenPowerManagement, |
| 639 POLICY_LEVEL_MANDATORY, |
| 640 POLICY_SCOPE_MACHINE, |
| 641 Value::CreateStringValue( |
| 642 container.login_screen_power_management()), |
| 643 NULL); |
| 644 } |
| 645 } |
| 633 } | 646 } |
| 634 | 647 |
| 635 } // namespace | 648 } // namespace |
| 636 | 649 |
| 637 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 650 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
| 638 PolicyMap* policies, | 651 PolicyMap* policies, |
| 639 EnterpriseInstallAttributes* install_attributes) { | 652 EnterpriseInstallAttributes* install_attributes) { |
| 640 // Decode the various groups of policies. | 653 // Decode the various groups of policies. |
| 641 DecodeLoginPolicies(policy, policies); | 654 DecodeLoginPolicies(policy, policies); |
| 642 DecodeKioskPolicies(policy, policies, install_attributes); | 655 DecodeKioskPolicies(policy, policies, install_attributes); |
| 643 DecodeNetworkPolicies(policy, policies, install_attributes); | 656 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 644 DecodeReportingPolicies(policy, policies); | 657 DecodeReportingPolicies(policy, policies); |
| 645 DecodeAutoUpdatePolicies(policy, policies); | 658 DecodeAutoUpdatePolicies(policy, policies); |
| 646 DecodeAccessibilityPolicies(policy, policies); | 659 DecodeAccessibilityPolicies(policy, policies); |
| 647 DecodeGenericPolicies(policy, policies); | 660 DecodeGenericPolicies(policy, policies); |
| 648 } | 661 } |
| 649 | 662 |
| 650 } // namespace policy | 663 } // namespace policy |
| OLD | NEW |