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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 | 578 |
579 if (container.has_login_screen_default_screen_magnifier_type()) { | 579 if (container.has_login_screen_default_screen_magnifier_type()) { |
580 policies->Set( | 580 policies->Set( |
581 key::kDeviceLoginScreenDefaultScreenMagnifierType, | 581 key::kDeviceLoginScreenDefaultScreenMagnifierType, |
582 POLICY_LEVEL_MANDATORY, | 582 POLICY_LEVEL_MANDATORY, |
583 POLICY_SCOPE_MACHINE, | 583 POLICY_SCOPE_MACHINE, |
584 DecodeIntegerValue( | 584 DecodeIntegerValue( |
585 container.login_screen_default_screen_magnifier_type()).release(), | 585 container.login_screen_default_screen_magnifier_type()).release(), |
586 NULL); | 586 NULL); |
587 } | 587 } |
588 | |
588 if (container.has_login_screen_default_virtual_keyboard_enabled()) { | 589 if (container.has_login_screen_default_virtual_keyboard_enabled()) { |
589 policies->Set( | 590 policies->Set( |
590 key::kDeviceLoginScreenDefaultVirtualKeyboardEnabled, | 591 key::kDeviceLoginScreenDefaultVirtualKeyboardEnabled, |
591 POLICY_LEVEL_MANDATORY, | 592 POLICY_LEVEL_MANDATORY, |
592 POLICY_SCOPE_MACHINE, | 593 POLICY_SCOPE_MACHINE, |
593 new base::FundamentalValue( | 594 new base::FundamentalValue( |
594 container.login_screen_default_virtual_keyboard_enabled()), | 595 container.login_screen_default_virtual_keyboard_enabled()), |
595 NULL); | 596 NULL); |
596 } | 597 } |
598 | |
599 if (container.has_login_screen_domain_auto_complete() && | |
Andrew T Wilson (Slow)
2015/03/23 16:02:02
Add a comment about why we're doing the empty() ch
peletskyi
2015/03/23 16:19:29
Done.
| |
600 !container.login_screen_domain_auto_complete().empty()) { | |
601 policies->Set( | |
602 key::kDeviceLoginScreenDomainAutoComplete, POLICY_LEVEL_MANDATORY, | |
603 POLICY_SCOPE_MACHINE, | |
604 new base::StringValue(container.login_screen_domain_auto_complete()), | |
605 nullptr); | |
606 } | |
597 } | 607 } |
598 } | 608 } |
599 | 609 |
600 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, | 610 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, |
601 PolicyMap* policies) { | 611 PolicyMap* policies) { |
602 if (policy.has_device_policy_refresh_rate()) { | 612 if (policy.has_device_policy_refresh_rate()) { |
603 const em::DevicePolicyRefreshRateProto& container( | 613 const em::DevicePolicyRefreshRateProto& container( |
604 policy.device_policy_refresh_rate()); | 614 policy.device_policy_refresh_rate()); |
605 if (container.has_device_policy_refresh_rate()) { | 615 if (container.has_device_policy_refresh_rate()) { |
606 policies->Set( | 616 policies->Set( |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
769 // Decode the various groups of policies. | 779 // Decode the various groups of policies. |
770 DecodeLoginPolicies(policy, policies); | 780 DecodeLoginPolicies(policy, policies); |
771 DecodeNetworkPolicies(policy, policies); | 781 DecodeNetworkPolicies(policy, policies); |
772 DecodeReportingPolicies(policy, policies); | 782 DecodeReportingPolicies(policy, policies); |
773 DecodeAutoUpdatePolicies(policy, policies); | 783 DecodeAutoUpdatePolicies(policy, policies); |
774 DecodeAccessibilityPolicies(policy, policies); | 784 DecodeAccessibilityPolicies(policy, policies); |
775 DecodeGenericPolicies(policy, policies); | 785 DecodeGenericPolicies(policy, policies); |
776 } | 786 } |
777 | 787 |
778 } // namespace policy | 788 } // namespace policy |
OLD | NEW |