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

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

Issue 2744923002: cr-policy-indicator element for non-preference-based indicators (Closed)
Patch Set: alphabetize Created 3 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/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 6e28f44220f922681e35ef9c608e88cfc57f41c5..b2349200702edb72ebdc56400f6ba279866bdc00 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
@@ -63,12 +63,6 @@ Polymer({
},
/**
- * A fake preference to provide cr-policy-pref-indicator with policy info.
- * @private {!chrome.settingsPrivate.PrefObject|undefined}
- */
- fakeTimeZonePolicyPref_: Object,
-
- /**
* Initialized with the current time zone so the menu displays the
* correct value. The full option list is fetched lazily if necessary by
* maybeGetTimeZoneList_.
@@ -118,24 +112,12 @@ Polymer({
* @private
*/
onTimeZoneAutoDetectPolicyChanged_: function(managed, valueFromPolicy) {
- if (!managed) {
+ if (managed) {
+ this.timeZoneAutoDetectPolicy_ = valueFromPolicy ?
+ settings.TimeZoneAutoDetectPolicy.FORCED_ON :
+ settings.TimeZoneAutoDetectPolicy.FORCED_OFF;
+ } else {
this.timeZoneAutoDetectPolicy_ = settings.TimeZoneAutoDetectPolicy.NONE;
- this.fakeTimeZonePolicyPref_ = undefined;
- return;
- }
-
- this.timeZoneAutoDetectPolicy_ = valueFromPolicy ?
- settings.TimeZoneAutoDetectPolicy.FORCED_ON :
- settings.TimeZoneAutoDetectPolicy.FORCED_OFF;
-
- if (!this.fakeTimeZonePolicyPref_) {
- this.fakeTimeZonePolicyPref_ = {
- key: 'fakeTimeZonePref',
- type: chrome.settingsPrivate.PrefType.NUMBER,
- value: 0,
- controlledBy: chrome.settingsPrivate.ControlledBy.DEVICE_POLICY,
- enforcement: chrome.settingsPrivate.Enforcement.ENFORCED,
- };
}
},

Powered by Google App Engine
This is Rietveld 408576698