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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 1849133006: Revert "ChromeOS: Add SystemTimezoneAutomaticDetection policy." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index a981ecedbb77f198ad8a34618185785c9f790d1a..8538abc2197e6382fe2914c52f8e9e6c0428eaa6 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -118,18 +118,6 @@ cr.define('options', function() {
systemTimezoneIsManaged_: false,
/**
- * True if system timezone detection is managed by policy.
- * @private {boolean}
- */
- systemTimezoneAutomaticDetectionIsManaged_: false,
-
- /**
- * This is the value of SystemTimezoneAutomaticDetection policy.
- * @private {boolean}
- */
- systemTimezoneAutomaticDetectionValue_: 0,
-
- /**
* Cached bluetooth adapter state.
* @private {?chrome.bluetooth.AdapterState}
*/
@@ -1693,36 +1681,17 @@ cr.define('options', function() {
* @private
*/
updateTimezoneSectionState_: function() {
- var self = this;
- $('resolve-timezone-by-geolocation')
- .onclick = function(event) {
- self.resolveTimezoneByGeolocation_ = event.currentTarget.checked;
- };
if (this.systemTimezoneIsManaged_) {
- $('resolve-timezone-by-geolocation').disabled = true;
- $('resolve-timezone-by-geolocation').checked = false;
- } else if (this.systemTimezoneAutomaticDetectionIsManaged_) {
- if (this.systemTimezoneAutomaticDetectionValue_ ==
- 0 /* USERS_DECIDE */) {
- $('resolve-timezone-by-geolocation').disabled = false;
- $('resolve-timezone-by-geolocation')
- .checked = this.resolveTimezoneByGeolocation_;
- $('timezone-value-select')
- .disabled = this.resolveTimezoneByGeolocation_;
- } else {
- $('resolve-timezone-by-geolocation').disabled = true;
- $('resolve-timezone-by-geolocation')
- .checked =
- (this.systemTimezoneAutomaticDetectionValue_ != 1 /* DISABLED */);
- $('timezone-value-select').disabled = true;
- }
+ $('resolve-timezone-by-geolocation-selection').disabled = true;
+ $('resolve-timezone-by-geolocation').onclick = function(event) {};
} else {
this.enableElementIfPossible_(
- getRequiredElement('resolve-timezone-by-geolocation'));
+ getRequiredElement('resolve-timezone-by-geolocation-selection'));
+ $('resolve-timezone-by-geolocation').onclick = function(event) {
+ $('timezone-value-select').disabled = event.currentTarget.checked;
+ };
$('timezone-value-select').disabled =
this.resolveTimezoneByGeolocation_;
- $('resolve-timezone-by-geolocation')
- .checked = this.resolveTimezoneByGeolocation_;
}
},
@@ -1738,18 +1707,6 @@ cr.define('options', function() {
},
/**
- * This is called from chromium code when system timezone detection
- * "managed" state is changed. Enables or disables dependent settings.
- * @param {boolean} managed Is true when system timezone autodetection is
- * managed by enterprise policy. False otherwize.
- */
- setSystemTimezoneAutomaticDetectionManaged_: function(managed, value) {
- this.systemTimezoneAutomaticDetectionIsManaged_ = managed;
- this.systemTimezoneAutomaticDetectionValue_ = value;
- this.updateTimezoneSectionState_();
- },
-
- /**
* This is Preferences event listener, which is called when
* kResolveTimezoneByGeolocation preference is changed.
* Enables or disables dependent settings.
@@ -2298,7 +2255,6 @@ cr.define('options', function() {
'setProfilesInfo',
'setSpokenFeedbackCheckboxState',
'setSystemTimezoneManaged',
- 'setSystemTimezoneAutomaticDetectionManaged',
'setThemesResetButtonEnabled',
'setVirtualKeyboardCheckboxState',
'setupPageZoomSelector',
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698