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

Unified Diff: chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js

Issue 2538373002: MD Settings: tweak tap and actionable-ness of <settings-toggle-button> (Closed)
Patch Set: fix tests Created 4 years 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/controls/settings_boolean_control_behavior.js
diff --git a/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js b/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js
index 0a2a053d663f33919ecdb85785c4df58ba3add1a..d15e3eb48f89f815c66809f0a8a898369fbe38e8 100644
--- a/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js
+++ b/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js
@@ -107,13 +107,11 @@ var SettingsBooleanControlBehaviorImpl = {
},
/**
- * @param {boolean} disabled
- * @param {!chrome.settingsPrivate.PrefObject} pref
* @return {boolean} Whether the checkbox should be disabled.
* @private
*/
- controlDisabled_: function(disabled, pref) {
- return disabled || this.isPrefPolicyControlled(pref);
+ controlDisabled_: function() {
+ return this.disabled || this.isPrefPolicyControlled(assert(this.pref));
dschuyler 2016/12/02 21:20:51 Is the error within isPrefPolicyControlled unclear
Dan Beam 2016/12/02 23:09:10 it's required to closure compile. this.pref shoul
dschuyler 2016/12/02 23:17:08 Okay. I wonder if an if() or something could check
Dan Beam 2016/12/02 23:21:28 we are doing both of those things, BUT: a) assert
},
};

Powered by Google App Engine
This is Rietveld 408576698