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

Unified Diff: chrome/browser/resources/settings/date_time_page/date_time_page.js

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Try remove g_browser_process check Created 3 years, 7 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/resources/settings/date_time_page/date_time_page.js
diff --git a/chrome/browser/resources/settings/date_time_page/date_time_page.js b/chrome/browser/resources/settings/date_time_page/date_time_page.js
index 3b004f22eabfd72b0a33f42437fe37b9ca52e093..032db244871b5eddfede191133f2f89bf55590f9 100644
--- a/chrome/browser/resources/settings/date_time_page/date_time_page.js
+++ b/chrome/browser/resources/settings/date_time_page/date_time_page.js
@@ -42,16 +42,6 @@ Polymer({
},
/**
- * Whether a policy controls the time zone auto-detect setting.
- * @private
- */
- hasTimeZoneAutoDetectPolicy_: {
- type: Boolean,
- computed:
- 'computeHasTimeZoneAutoDetectPolicy_(timeZoneAutoDetectPolicy_)',
- },
-
- /**
* The effective time zone auto-detect setting.
* @private
*/
@@ -91,7 +81,7 @@ Polymer({
observers: [
'maybeGetTimeZoneList_(' +
- 'prefs.cros.system.timezone.value, timeZoneAutoDetect_)',
+ 'prefs.settings.timezone.value, timeZoneAutoDetect_)',
],
/** @override */
@@ -146,15 +136,6 @@ Polymer({
/**
* @param {settings.TimeZoneAutoDetectPolicy} timeZoneAutoDetectPolicy
- * @return {boolean}
- * @private
- */
- computeHasTimeZoneAutoDetectPolicy_: function(timeZoneAutoDetectPolicy) {
- return timeZoneAutoDetectPolicy != settings.TimeZoneAutoDetectPolicy.NONE;
- },
-
- /**
- * @param {settings.TimeZoneAutoDetectPolicy} timeZoneAutoDetectPolicy
* @param {boolean} prefValue Value of the geolocation pref.
* @return {boolean} Whether time zone auto-detect is enabled.
* @private
@@ -183,7 +164,7 @@ Polymer({
// If auto-detect is enabled, we only need the current time zone.
if (this.timeZoneAutoDetect_ &&
- this.getPref('cros.system.timezone').value ==
+ this.getPref('settings.timezone').value ==
this.timeZoneList_[0].value) {
return;
}
@@ -204,4 +185,17 @@ Polymer({
};
});
},
+
+
+ /**
+ * Computes visibility of user timezone preference.
+ * @param prefUserTimezone Object pref.settings.timezone
+ * @param prefResolveValue Boolean
+ * prefs.settings.resolve_timezone_by_geolocation.value
+ * @private
+ */
+ isUserTimeZoneSelectorHidden_: function(prefUserTimezone, prefResolveValue) {
+ return (prefUserTimezone && prefUserTimezone.controlledBy != null) ||
+ (prefResolveValue == true);
+ },
});

Powered by Google App Engine
This is Rietveld 408576698