Chromium Code Reviews| Index: chrome/browser/resources/options/confirm_dialog.js |
| diff --git a/chrome/browser/resources/options/confirm_dialog.js b/chrome/browser/resources/options/confirm_dialog.js |
| index cbce2751163a599b408ad75f71b1f3ad68f71ba1..dee02bb1ab573595d494c7c6e9946af1cb159962 100644 |
| --- a/chrome/browser/resources/options/confirm_dialog.js |
| +++ b/chrome/browser/resources/options/confirm_dialog.js |
| @@ -18,18 +18,18 @@ cr.define('options', function() { |
| * @param {HTMLInputElement} cancelButton The cancellation button element. |
| * @param {string} pref The pref that requires confirmation. |
| * @param {string} metric User metrics identifier. |
| - * @param {string} confirmed_pref A pref used to remember whether the user has |
| - * confirmed the dialog before. This ensures that the user is presented |
| - * with the dialog only once. If left |undefined| or |null|, the dialog |
| + * @param {string=} opt_confirmedPref A pref used to remember whether the |
| + * user has confirmed the dialog before. This ensures that the user is |
| + * presented with the dialog only once. If left |undefined|, the dialog |
| * will pop up every time the user attempts to set |pref| to |true|. |
| * @extends {options.SettingsDialog} |
| */ |
| function ConfirmDialog(name, title, pageDivName, okButton, cancelButton, pref, |
| - metric, confirmed_pref) { |
| + metric, opt_confirmedPref) { |
| SettingsDialog.call(this, name, title, pageDivName, okButton, cancelButton); |
| this.pref = pref; |
| this.metric = metric; |
| - this.confirmed_pref = confirmed_pref; |
| + this.confirmedPref = opt_confirmedPref; |
|
Dan Beam
2014/09/11 05:26:12
why isn't this (and maybe other members) @private?
Vitaly Pavlenko
2014/09/11 21:12:31
I'm not sure for |metric| and |pref|. |confirmedPr
Dan Beam
2014/09/11 22:51:08
/** @protected */
this.pref = pref;
/** @protecte
Vitaly Pavlenko
2014/09/11 23:13:09
Doneish. Still remember that @private and @protect
|
| this.confirmed_ = false; |
| } |
| @@ -56,7 +56,7 @@ cr.define('options', function() { |
| }, |
| /** |
| - * Handle changes to |confirmed_pref| by caching them. |
| + * Handle changes to |confirmedPref| by caching them. |
| * @param {Event} event Change event. |
| * @private |
| */ |
| @@ -72,15 +72,15 @@ cr.define('options', function() { |
| this.cancelButton.onclick = this.handleCancel.bind(this); |
| Preferences.getInstance().addEventListener( |
| this.pref, this.onPrefChanged_.bind(this)); |
| - if (this.confirmed_pref) { |
| + if (this.confirmedPref) { |
| Preferences.getInstance().addEventListener( |
| - this.confirmed_pref, this.onConfirmedChanged_.bind(this)); |
| + this.confirmedPref, this.onConfirmedChanged_.bind(this)); |
| } |
| }, |
| /** |
| * Handle the confirm button by committing the |pref| change. If |
| - * |confirmed_pref| has been specified, also remember that the dialog has |
| + * |confirmedPref| has been specified, also remember that the dialog has |
| * been confirmed to avoid bringing it up in the future. |
| * @override |
| */ |
| @@ -88,8 +88,8 @@ cr.define('options', function() { |
| SettingsDialog.prototype.handleConfirm.call(this); |
| Preferences.getInstance().commitPref(this.pref, this.metric); |
| - if (this.confirmed_pref) |
| - Preferences.setBooleanPref(this.confirmed_pref, true, true); |
| + if (this.confirmedPref) |
| + Preferences.setBooleanPref(this.confirmedPref, true, true); |
| }, |
| /** |