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

Side by Side Diff: chrome/browser/resources/settings/date_time_page/date_time_page.js

Issue 2479973002: MD Settings: clarify "controlled by" logic (Closed)
Patch Set: merge Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-date-time-page' is the settings page containing date and time 7 * 'settings-date-time-page' is the settings page containing date and time
8 * settings. 8 * settings.
9 */ 9 */
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 this.timeZoneAutoDetectPolicy_ = valueFromPolicy ? 127 this.timeZoneAutoDetectPolicy_ = valueFromPolicy ?
128 settings.TimeZoneAutoDetectPolicy.FORCED_ON : 128 settings.TimeZoneAutoDetectPolicy.FORCED_ON :
129 settings.TimeZoneAutoDetectPolicy.FORCED_OFF; 129 settings.TimeZoneAutoDetectPolicy.FORCED_OFF;
130 130
131 if (!this.fakeTimeZonePolicyPref_) { 131 if (!this.fakeTimeZonePolicyPref_) {
132 this.fakeTimeZonePolicyPref_ = { 132 this.fakeTimeZonePolicyPref_ = {
133 key: 'fakeTimeZonePref', 133 key: 'fakeTimeZonePref',
134 type: chrome.settingsPrivate.PrefType.NUMBER, 134 type: chrome.settingsPrivate.PrefType.NUMBER,
135 value: 0, 135 value: 0,
136 policySource: chrome.settingsPrivate.PolicySource.DEVICE_POLICY, 136 controlledBy: chrome.settingsPrivate.ControlledBy.DEVICE_POLICY,
137 policyEnforcement: chrome.settingsPrivate.PolicyEnforcement.ENFORCED, 137 enforcement: chrome.settingsPrivate.Enforcement.ENFORCED,
138 }; 138 };
139 } 139 }
140 }, 140 },
141 141
142 /** 142 /**
143 * @param {boolean} canSetDateTime Whether date and time are settable. 143 * @param {boolean} canSetDateTime Whether date and time are settable.
144 * @private 144 * @private
145 */ 145 */
146 onCanSetDateTimeChanged_: function(canSetDateTime) { 146 onCanSetDateTimeChanged_: function(canSetDateTime) {
147 this.canSetDateTime_ = canSetDateTime; 147 this.canSetDateTime_ = canSetDateTime;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 */ 215 */
216 setTimeZoneList_: function(timeZones) { 216 setTimeZoneList_: function(timeZones) {
217 this.timeZoneList_ = timeZones.map(function(timeZonePair) { 217 this.timeZoneList_ = timeZones.map(function(timeZonePair) {
218 return { 218 return {
219 name: timeZonePair[1], 219 name: timeZonePair[1],
220 value: timeZonePair[0], 220 value: timeZonePair[0],
221 }; 221 };
222 }); 222 });
223 }, 223 },
224 }); 224 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698