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 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 588 | 588 |
| 589 if (container.has_login_screen_default_virtual_keyboard_enabled()) { | 589 if (container.has_login_screen_default_virtual_keyboard_enabled()) { |
| 590 policies->Set( | 590 policies->Set( |
| 591 key::kDeviceLoginScreenDefaultVirtualKeyboardEnabled, | 591 key::kDeviceLoginScreenDefaultVirtualKeyboardEnabled, |
| 592 POLICY_LEVEL_MANDATORY, | 592 POLICY_LEVEL_MANDATORY, |
| 593 POLICY_SCOPE_MACHINE, | 593 POLICY_SCOPE_MACHINE, |
| 594 new base::FundamentalValue( | 594 new base::FundamentalValue( |
| 595 container.login_screen_default_virtual_keyboard_enabled()), | 595 container.login_screen_default_virtual_keyboard_enabled()), |
| 596 NULL); | 596 NULL); |
| 597 } | 597 } |
| 598 | |
| 599 // The behavior when policy is not set and when it is set to an empty string | |
| 600 // is the same. Thus lets add policy to the map only if it is set and its | |
| 601 // value is not an empty string. | |
|
Mattias Nissler (ping if slow)
2015/04/02 08:29:38
The rule is to show whatever is present in policy
peletskyi
2015/04/07 12:06:29
Done.
| |
| 602 if (container.has_login_screen_domain_auto_complete() && | |
| 603 !container.login_screen_domain_auto_complete().empty()) { | |
| 604 policies->Set( | |
| 605 key::kDeviceLoginScreenDomainAutoComplete, POLICY_LEVEL_MANDATORY, | |
| 606 POLICY_SCOPE_MACHINE, | |
| 607 new base::StringValue(container.login_screen_domain_auto_complete()), | |
| 608 nullptr); | |
| 609 } | |
|
Mattias Nissler (ping if slow)
2015/04/02 08:29:38
This block should stay, so the policy gets display
peletskyi
2015/04/07 12:06:29
Done.
| |
| 610 } | 598 } |
| 611 } | 599 } |
| 612 | 600 |
| 613 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, | 601 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 614 PolicyMap* policies) { | 602 PolicyMap* policies) { |
| 615 if (policy.has_device_policy_refresh_rate()) { | 603 if (policy.has_device_policy_refresh_rate()) { |
| 616 const em::DevicePolicyRefreshRateProto& container( | 604 const em::DevicePolicyRefreshRateProto& container( |
| 617 policy.device_policy_refresh_rate()); | 605 policy.device_policy_refresh_rate()); |
| 618 if (container.has_device_policy_refresh_rate()) { | 606 if (container.has_device_policy_refresh_rate()) { |
| 619 policies->Set( | 607 policies->Set( |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 782 // Decode the various groups of policies. | 770 // Decode the various groups of policies. |
| 783 DecodeLoginPolicies(policy, policies); | 771 DecodeLoginPolicies(policy, policies); |
| 784 DecodeNetworkPolicies(policy, policies); | 772 DecodeNetworkPolicies(policy, policies); |
| 785 DecodeReportingPolicies(policy, policies); | 773 DecodeReportingPolicies(policy, policies); |
| 786 DecodeAutoUpdatePolicies(policy, policies); | 774 DecodeAutoUpdatePolicies(policy, policies); |
| 787 DecodeAccessibilityPolicies(policy, policies); | 775 DecodeAccessibilityPolicies(policy, policies); |
| 788 DecodeGenericPolicies(policy, policies); | 776 DecodeGenericPolicies(policy, policies); |
| 789 } | 777 } |
| 790 | 778 |
| 791 } // namespace policy | 779 } // namespace policy |
| OLD | NEW |