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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 if (policy.has_system_timezone()) { | 699 if (policy.has_system_timezone()) { |
700 if (policy.system_timezone().has_timezone()) { | 700 if (policy.system_timezone().has_timezone()) { |
701 policies->Set(key::kSystemTimezone, | 701 policies->Set(key::kSystemTimezone, |
702 POLICY_LEVEL_MANDATORY, | 702 POLICY_LEVEL_MANDATORY, |
703 POLICY_SCOPE_MACHINE, | 703 POLICY_SCOPE_MACHINE, |
704 POLICY_SOURCE_CLOUD, | 704 POLICY_SOURCE_CLOUD, |
705 new base::StringValue( | 705 new base::StringValue( |
706 policy.system_timezone().timezone()), | 706 policy.system_timezone().timezone()), |
707 NULL); | 707 NULL); |
708 } | 708 } |
| 709 |
| 710 if (policy.system_timezone().has_timezone_detection_type()) { |
| 711 scoped_ptr<base::Value> value(DecodeIntegerValue( |
| 712 policy.system_timezone().timezone_detection_type())); |
| 713 if (value) { |
| 714 policies->Set(key::kSystemTimezoneAutomaticDetection, |
| 715 POLICY_LEVEL_MANDATORY, |
| 716 POLICY_SCOPE_MACHINE, |
| 717 POLICY_SOURCE_CLOUD, |
| 718 value.release(), |
| 719 nullptr); |
| 720 } |
| 721 } |
709 } | 722 } |
710 | 723 |
711 if (policy.has_use_24hour_clock()) { | 724 if (policy.has_use_24hour_clock()) { |
712 if (policy.use_24hour_clock().has_use_24hour_clock()) { | 725 if (policy.use_24hour_clock().has_use_24hour_clock()) { |
713 policies->Set(key::kSystemUse24HourClock, | 726 policies->Set(key::kSystemUse24HourClock, |
714 POLICY_LEVEL_MANDATORY, | 727 POLICY_LEVEL_MANDATORY, |
715 POLICY_SCOPE_MACHINE, | 728 POLICY_SCOPE_MACHINE, |
716 POLICY_SOURCE_CLOUD, | 729 POLICY_SOURCE_CLOUD, |
717 new base::FundamentalValue( | 730 new base::FundamentalValue( |
718 policy.use_24hour_clock().use_24hour_clock()), | 731 policy.use_24hour_clock().use_24hour_clock()), |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 // Decode the various groups of policies. | 922 // Decode the various groups of policies. |
910 DecodeLoginPolicies(policy, policies); | 923 DecodeLoginPolicies(policy, policies); |
911 DecodeNetworkPolicies(policy, policies); | 924 DecodeNetworkPolicies(policy, policies); |
912 DecodeReportingPolicies(policy, policies); | 925 DecodeReportingPolicies(policy, policies); |
913 DecodeAutoUpdatePolicies(policy, policies); | 926 DecodeAutoUpdatePolicies(policy, policies); |
914 DecodeAccessibilityPolicies(policy, policies); | 927 DecodeAccessibilityPolicies(policy, policies); |
915 DecodeGenericPolicies(policy, policies); | 928 DecodeGenericPolicies(policy, policies); |
916 } | 929 } |
917 | 930 |
918 } // namespace policy | 931 } // namespace policy |
OLD | NEW |