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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 875 } | 875 } |
| 876 if (entry->has_product_id()) { | 876 if (entry->has_product_id()) { |
| 877 ids->SetString("pid", base::StringPrintf("%04X", entry->product_id())); | 877 ids->SetString("pid", base::StringPrintf("%04X", entry->product_id())); |
| 878 } | 878 } |
| 879 whitelist->Append(ids); | 879 whitelist->Append(ids); |
| 880 } | 880 } |
| 881 policies->Set(key::kUsbDetachableWhitelist, POLICY_LEVEL_MANDATORY, | 881 policies->Set(key::kUsbDetachableWhitelist, POLICY_LEVEL_MANDATORY, |
| 882 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, whitelist, | 882 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, whitelist, |
| 883 nullptr); | 883 nullptr); |
| 884 } | 884 } |
| 885 | |
| 886 if (policy.has_system_timezone_automatic_detection()) { | |
| 887 if (policy.system_timezone_automatic_detection() | |
| 888 .has_timezone_detection_type()) { | |
|
stevenjb
2016/03/28 23:23:17
Combine ifs
Alexander Alekseev
2016/03/29 00:29:25
Done.
| |
| 889 policies->Set(key::kSystemTimezoneAutomaticDetection, | |
| 890 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | |
| 891 POLICY_SOURCE_CLOUD, | |
| 892 new base::FundamentalValue( | |
| 893 policy.system_timezone_automatic_detection() | |
| 894 .timezone_detection_type()), | |
| 895 nullptr); | |
| 896 } | |
| 897 } | |
| 885 } | 898 } |
| 886 | 899 |
| 887 } // namespace | 900 } // namespace |
| 888 | 901 |
| 889 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 902 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
| 890 PolicyMap* policies) { | 903 PolicyMap* policies) { |
| 891 // Decode the various groups of policies. | 904 // Decode the various groups of policies. |
| 892 DecodeLoginPolicies(policy, policies); | 905 DecodeLoginPolicies(policy, policies); |
| 893 DecodeNetworkPolicies(policy, policies); | 906 DecodeNetworkPolicies(policy, policies); |
| 894 DecodeReportingPolicies(policy, policies); | 907 DecodeReportingPolicies(policy, policies); |
| 895 DecodeAutoUpdatePolicies(policy, policies); | 908 DecodeAutoUpdatePolicies(policy, policies); |
| 896 DecodeAccessibilityPolicies(policy, policies); | 909 DecodeAccessibilityPolicies(policy, policies); |
| 897 DecodeGenericPolicies(policy, policies); | 910 DecodeGenericPolicies(policy, policies); |
| 898 } | 911 } |
| 899 | 912 |
| 900 } // namespace policy | 913 } // namespace policy |
| OLD | NEW |