| 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 b22619ae1e5919ab0daa12d38d74d287d2feec86..340c3806092f8f674863b11629d7204980b6966e 100644
|
| --- a/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js
|
| +++ b/chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js
|
| @@ -90,10 +90,11 @@ var SettingsBooleanControlBehaviorImpl = {
|
| // Ensure that newValue is the correct type for the pref type, either
|
| // a boolean or a number.
|
| if (this.pref.type == chrome.settingsPrivate.PrefType.NUMBER) {
|
| + assert(!this.inverted);
|
| this.set('pref.value', this.checked ? 1 : this.numericUncheckedValue);
|
| return;
|
| }
|
| - this.set('pref.value', this.checked);
|
| + this.set('pref.value', this.inverted ? !this.checked : this.checked);
|
| },
|
|
|
| /**
|
| @@ -113,9 +114,10 @@ var SettingsBooleanControlBehaviorImpl = {
|
| getNewValue_: function(value) {
|
| // For numeric prefs, the control is only false if the value is exactly
|
| // equal to the unchecked-equivalent value.
|
| - if (this.pref.type == chrome.settingsPrivate.PrefType.NUMBER)
|
| - value = value != this.numericUncheckedValue;
|
| -
|
| + if (this.pref.type == chrome.settingsPrivate.PrefType.NUMBER) {
|
| + assert(!this.inverted);
|
| + return value != this.numericUncheckedValue;
|
| + }
|
| return this.inverted ? !value : !!value;
|
| },
|
|
|
|
|