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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
815 const em::DisplayRotationDefaultProto& container( | 815 const em::DisplayRotationDefaultProto& container( |
816 policy.display_rotation_default()); | 816 policy.display_rotation_default()); |
817 policies->Set( | 817 policies->Set( |
818 key::kDisplayRotationDefault, | 818 key::kDisplayRotationDefault, |
819 POLICY_LEVEL_MANDATORY, | 819 POLICY_LEVEL_MANDATORY, |
820 POLICY_SCOPE_MACHINE, | 820 POLICY_SCOPE_MACHINE, |
821 POLICY_SOURCE_CLOUD, | 821 POLICY_SOURCE_CLOUD, |
822 DecodeIntegerValue(container.display_rotation_default()).release(), | 822 DecodeIntegerValue(container.display_rotation_default()).release(), |
823 nullptr); | 823 nullptr); |
824 } | 824 } |
825 | |
826 if (policy.has_quirks_download_enabled()) { | |
827 const em::DeviceQuirksDownloadEnabledProto& container( | |
828 policy.quirks_download_enabled()); | |
829 if (container.has_quirks_download_enabled()) { | |
Greg Levin
2016/03/14 17:29:47
Is this second "if" statement needed? Some of the
Thiemo Nagel
2016/03/23 14:53:24
It all depends on the policy proto that we receive
Greg Levin
2016/03/24 23:21:39
Acknowledged.
| |
830 policies->Set( | |
831 key::kDeviceQuirksDownloadEnabled, | |
832 POLICY_LEVEL_MANDATORY, | |
833 POLICY_SCOPE_MACHINE, | |
834 POLICY_SOURCE_CLOUD, | |
835 new base::FundamentalValue(container.quirks_download_enabled()), | |
836 NULL); | |
Greg Levin
2016/03/14 17:29:47
git cl format complained about this block, request
Thiemo Nagel
2016/03/23 14:53:24
I'd agree. Consistency trumps everything.
Greg Levin
2016/03/24 23:21:39
Done.
| |
837 } | |
838 } | |
825 } | 839 } |
826 | 840 |
827 } // namespace | 841 } // namespace |
828 | 842 |
829 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 843 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
830 PolicyMap* policies) { | 844 PolicyMap* policies) { |
831 // Decode the various groups of policies. | 845 // Decode the various groups of policies. |
832 DecodeLoginPolicies(policy, policies); | 846 DecodeLoginPolicies(policy, policies); |
833 DecodeNetworkPolicies(policy, policies); | 847 DecodeNetworkPolicies(policy, policies); |
834 DecodeReportingPolicies(policy, policies); | 848 DecodeReportingPolicies(policy, policies); |
835 DecodeAutoUpdatePolicies(policy, policies); | 849 DecodeAutoUpdatePolicies(policy, policies); |
836 DecodeAccessibilityPolicies(policy, policies); | 850 DecodeAccessibilityPolicies(policy, policies); |
837 DecodeGenericPolicies(policy, policies); | 851 DecodeGenericPolicies(policy, policies); |
838 } | 852 } |
839 | 853 |
840 } // namespace policy | 854 } // namespace policy |
OLD | NEW |