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( |
| 715 key::kSystemTimezoneAutomaticDetection, |
| 716 POLICY_LEVEL_MANDATORY, |
| 717 POLICY_SCOPE_MACHINE, |
| 718 POLICY_SOURCE_CLOUD, |
| 719 value.release(), |
| 720 nullptr); |
| 721 } |
| 722 } |
709 } | 723 } |
710 | 724 |
711 if (policy.has_use_24hour_clock()) { | 725 if (policy.has_use_24hour_clock()) { |
712 if (policy.use_24hour_clock().has_use_24hour_clock()) { | 726 if (policy.use_24hour_clock().has_use_24hour_clock()) { |
713 policies->Set(key::kSystemUse24HourClock, | 727 policies->Set(key::kSystemUse24HourClock, |
714 POLICY_LEVEL_MANDATORY, | 728 POLICY_LEVEL_MANDATORY, |
715 POLICY_SCOPE_MACHINE, | 729 POLICY_SCOPE_MACHINE, |
716 POLICY_SOURCE_CLOUD, | 730 POLICY_SOURCE_CLOUD, |
717 new base::FundamentalValue( | 731 new base::FundamentalValue( |
718 policy.use_24hour_clock().use_24hour_clock()), | 732 policy.use_24hour_clock().use_24hour_clock()), |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 // Decode the various groups of policies. | 905 // Decode the various groups of policies. |
892 DecodeLoginPolicies(policy, policies); | 906 DecodeLoginPolicies(policy, policies); |
893 DecodeNetworkPolicies(policy, policies); | 907 DecodeNetworkPolicies(policy, policies); |
894 DecodeReportingPolicies(policy, policies); | 908 DecodeReportingPolicies(policy, policies); |
895 DecodeAutoUpdatePolicies(policy, policies); | 909 DecodeAutoUpdatePolicies(policy, policies); |
896 DecodeAccessibilityPolicies(policy, policies); | 910 DecodeAccessibilityPolicies(policy, policies); |
897 DecodeGenericPolicies(policy, policies); | 911 DecodeGenericPolicies(policy, policies); |
898 } | 912 } |
899 | 913 |
900 } // namespace policy | 914 } // namespace policy |
OLD | NEW |