Chromium Code Reviews| Index: chrome/browser/resources/options/automatic_settings_reset_banner.js |
| diff --git a/chrome/browser/resources/options/automatic_settings_reset_banner.js b/chrome/browser/resources/options/automatic_settings_reset_banner.js |
| index bdd909059d2052a734b3c651dfb71b185bbc4813..8e5f7aa19fa5672d33bda816b5df7823a99269f8 100644 |
| --- a/chrome/browser/resources/options/automatic_settings_reset_banner.js |
| +++ b/chrome/browser/resources/options/automatic_settings_reset_banner.js |
| @@ -11,7 +11,6 @@ cr.define('options', function() { |
| * AutomaticSettingsResetBanner class |
| * Provides encapsulated handling of the Reset Profile Settings banner. |
| * @constructor |
| - * @extends {options.SettingsBannerBase} |
| */ |
| function AutomaticSettingsResetBanner() {} |
| @@ -31,13 +30,13 @@ cr.define('options', function() { |
| * our show() method. This would mean that the banner would be first |
| * dismissed, then shown. We want to prevent this. |
| * |
| - * @type {boolean} |
| - * @private |
| + * @private {boolean} |
| */ |
| - hadBeenDismissed_: false, |
| + wasDismissed_: false, |
| /** |
| * Metric name to send when a show event occurs. |
| + * @private {string} |
| */ |
| showMetricName_: '', |
| @@ -48,8 +47,9 @@ cr.define('options', function() { |
| /** |
| * DOM element whose visibility is set when setVisibility_ is called. |
| + * @private {HTMLElement} |
|
Dan Beam
2015/11/18 17:38:22
nit: ?HTMLElement
robertshield
2015/11/19 00:04:45
Done.
|
| */ |
| - setVisibilibyDomElement_: null, |
| + visibleElement_: null, |
| /** |
| * Initializes the banner's event handlers. |
| @@ -66,7 +66,7 @@ cr.define('options', function() { |
| this.dismissNativeCallbackName_ = |
| 'onDismissedAutomaticSettingsResetBanner'; |
| - this.setVisibilibyDomElement_ = $('automatic-settings-reset-banner'); |
| + this.visibleElement_ = $('automatic-settings-reset-banner'); |
|
Dan Beam
2015/11/18 17:38:22
nit:
this.visibleElement_ = getRequiredElement('a
robertshield
2015/11/19 00:04:44
Done.
|
| $('automatic-settings-reset-banner-close').onclick = function(event) { |
| chrome.send('metricsHandler:recordAction', |
| @@ -91,7 +91,7 @@ cr.define('options', function() { |
| * @protected |
| */ |
| setVisibility: function(show) { |
| - this.setVisibilibyDomElement_.hidden = !show; |
| + this.visibleElement_.hidden = !show; |
| }, |
| /** |
| @@ -99,7 +99,7 @@ cr.define('options', function() { |
| * @private |
| */ |
| show_: function() { |
| - if (!this.hadBeenDismissed_) { |
| + if (!this.wasDismissed_) { |
| chrome.send('metricsHandler:recordAction', [this.showMetricName_]); |
| this.setVisibility(true); |
| } |
| @@ -112,8 +112,9 @@ cr.define('options', function() { |
| * @private |
| */ |
| dismiss_: function() { |
| + assert(this.dismissNativeCallbackName_); |
| chrome.send(this.dismissNativeCallbackName_); |
|
Dan Beam
2015/11/18 17:38:22
nit: chrome.send(assert(this.dismissNativeCallback
robertshield
2015/11/19 00:04:45
Done.
|
| - this.hadBeenDismissed_ = true; |
| + this.wasDismissed_ = true; |
| this.setVisibility(false); |
| }, |
| }; |