Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Side by Side Diff: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc

Issue 1849133006: Revert "ChromeOS: Add SystemTimezoneAutomaticDetection policy." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
722 } 709 }
723 710
724 if (policy.has_use_24hour_clock()) { 711 if (policy.has_use_24hour_clock()) {
725 if (policy.use_24hour_clock().has_use_24hour_clock()) { 712 if (policy.use_24hour_clock().has_use_24hour_clock()) {
726 policies->Set(key::kSystemUse24HourClock, 713 policies->Set(key::kSystemUse24HourClock,
727 POLICY_LEVEL_MANDATORY, 714 POLICY_LEVEL_MANDATORY,
728 POLICY_SCOPE_MACHINE, 715 POLICY_SCOPE_MACHINE,
729 POLICY_SOURCE_CLOUD, 716 POLICY_SOURCE_CLOUD,
730 new base::FundamentalValue( 717 new base::FundamentalValue(
731 policy.use_24hour_clock().use_24hour_clock()), 718 policy.use_24hour_clock().use_24hour_clock()),
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 // Decode the various groups of policies. 891 // Decode the various groups of policies.
905 DecodeLoginPolicies(policy, policies); 892 DecodeLoginPolicies(policy, policies);
906 DecodeNetworkPolicies(policy, policies); 893 DecodeNetworkPolicies(policy, policies);
907 DecodeReportingPolicies(policy, policies); 894 DecodeReportingPolicies(policy, policies);
908 DecodeAutoUpdatePolicies(policy, policies); 895 DecodeAutoUpdatePolicies(policy, policies);
909 DecodeAccessibilityPolicies(policy, policies); 896 DecodeAccessibilityPolicies(policy, policies);
910 DecodeGenericPolicies(policy, policies); 897 DecodeGenericPolicies(policy, policies);
911 } 898 }
912 899
913 } // namespace policy 900 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698