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

Unified Diff: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc

Issue 1843523002: ChromeOS: Add SystemTimezoneAutomaticDetection policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@596690--Implement-better-timezone-detection--refactoring-before-policy
Patch Set: Moved policy to SystemTimezone. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
index 3bc77ada84d748b2e57f02efe20948564a47cd02..278f63dc55436adc38d0affc8f7254614f26e60d 100644
--- a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
+++ b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
@@ -706,6 +706,20 @@ void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy,
policy.system_timezone().timezone()),
NULL);
}
+
+ if (policy.system_timezone().has_timezone_detection_type()) {
+ scoped_ptr<base::Value> value(DecodeIntegerValue(
+ policy.system_timezone().timezone_detection_type()));
+ if (value) {
+ policies->Set(
+ key::kSystemTimezoneAutomaticDetection,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_MACHINE,
+ POLICY_SOURCE_CLOUD,
+ value.release(),
+ nullptr);
+ }
+ }
}
if (policy.has_use_24hour_clock()) {

Powered by Google App Engine
This is Rietveld 408576698