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

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

Issue 1358433003: MD Settings: Make PolicyControllable behavior for isPolicyControlled() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: i have brought great shame upon us Created 5 years, 3 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/checkbox/checkbox.js
diff --git a/chrome/browser/resources/settings/checkbox/checkbox.js b/chrome/browser/resources/settings/checkbox/checkbox.js
index 49ebb3ab3fa8d1c5b982b250810bc82f0f9990a4..2b5146affb74f80f9b6af6517ad9c5182ef8c009 100644
--- a/chrome/browser/resources/settings/checkbox/checkbox.js
+++ b/chrome/browser/resources/settings/checkbox/checkbox.js
@@ -16,6 +16,8 @@
Polymer({
is: 'cr-settings-checkbox',
+ behaviors: [PolicyControllable],
+
properties: {
/**
* The boolean preference object to control.
@@ -100,8 +102,6 @@ Polymer({
* @private
*/
checkboxDisabled_: function(disabled, pref) {
- return disabled || (!!pref &&
- pref.policyEnforcement ==
- chrome.settingsPrivate.PolicyEnforcement.ENFORCED);
+ return disabled || this.isPolicyControlled(pref);
},
});

Powered by Google App Engine
This is Rietveld 408576698