Chromium Code Reviews| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 | 570 |
| 571 if (policy.has_attestation_settings()) { | 571 if (policy.has_attestation_settings()) { |
| 572 if (policy.attestation_settings().has_attestation_enabled()) { | 572 if (policy.attestation_settings().has_attestation_enabled()) { |
| 573 policies->Set(key::kAttestationEnabledForDevice, | 573 policies->Set(key::kAttestationEnabledForDevice, |
| 574 POLICY_LEVEL_MANDATORY, | 574 POLICY_LEVEL_MANDATORY, |
| 575 POLICY_SCOPE_MACHINE, | 575 POLICY_SCOPE_MACHINE, |
| 576 Value::CreateBooleanValue( | 576 Value::CreateBooleanValue( |
| 577 policy.attestation_settings().attestation_enabled())); | 577 policy.attestation_settings().attestation_enabled())); |
| 578 } | 578 } |
| 579 } | 579 } |
| 580 | |
| 581 if (policy.has_login_screen_power_management()) { | |
| 582 const em::LoginScreenPowerManagementProto& container( | |
| 583 policy.login_screen_power_management()); | |
| 584 if (container.has_login_screen_power_management()) { | |
| 585 policies->Set(key::kDeviceLoginScreenPowerManagement, | |
| 586 POLICY_LEVEL_MANDATORY, | |
| 587 POLICY_SCOPE_MACHINE, | |
| 588 Value::CreateStringValue( | |
|
Mattias Nissler (ping if slow)
2013/07/08 17:36:57
It'd be nice to pass a dictionary value here if po
bartfab (slow)
2013/07/09 10:02:33
Right now, string is the better choice. To get a d
| |
| 589 container.login_screen_power_management())); | |
| 590 } | |
| 591 } | |
| 580 } | 592 } |
| 581 | 593 |
| 582 } // namespace | 594 } // namespace |
| 583 | 595 |
| 584 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 596 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
| 585 PolicyMap* policies, | 597 PolicyMap* policies, |
| 586 EnterpriseInstallAttributes* install_attributes) { | 598 EnterpriseInstallAttributes* install_attributes) { |
| 587 // Decode the various groups of policies. | 599 // Decode the various groups of policies. |
| 588 DecodeLoginPolicies(policy, policies); | 600 DecodeLoginPolicies(policy, policies); |
| 589 DecodeKioskPolicies(policy, policies, install_attributes); | 601 DecodeKioskPolicies(policy, policies, install_attributes); |
| 590 DecodeNetworkPolicies(policy, policies, install_attributes); | 602 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 591 DecodeReportingPolicies(policy, policies); | 603 DecodeReportingPolicies(policy, policies); |
| 592 DecodeAutoUpdatePolicies(policy, policies); | 604 DecodeAutoUpdatePolicies(policy, policies); |
| 593 DecodeAccessibilityPolicies(policy, policies); | 605 DecodeAccessibilityPolicies(policy, policies); |
| 594 DecodeGenericPolicies(policy, policies); | 606 DecodeGenericPolicies(policy, policies); |
| 595 } | 607 } |
| 596 | 608 |
| 597 } // namespace policy | 609 } // namespace policy |
| OLD | NEW |