| 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 85614f97ac4030767af0eda69036eac424ff9c37..fa6a550736a71c7c16e8bf5ec4ebc3e9fa92bfe5 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;
|
| },
|
|
|
|
|