| Index: chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
|
| diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
|
| index e5b178c7334dbeba22388b59b7dfd5a8f7b7a5bc..a6a41bf07c5bddc465244c40cc56cb1922f7d14c 100644
|
| --- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
|
| +++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
|
| @@ -51,6 +51,9 @@ Polymer({
|
|
|
| /** @private */
|
| clearingInProgress_: Boolean,
|
| +
|
| + /** @private */
|
| + showOtherFormsOfBrowsingHistoryNotice_: Boolean,
|
| },
|
|
|
| /** @private {!settings.ClearBrowsingDataBrowserProxy} */
|
| @@ -120,12 +123,32 @@ Polymer({
|
| this.$.dialog.open();
|
| },
|
|
|
| - /** @private */
|
| + /**
|
| + * Handles the tap on the Clear Data button.
|
| + * @private
|
| + */
|
| onClearBrowsingDataTap_: function() {
|
| this.clearingInProgress_ = true;
|
| - this.browserProxy_.clearBrowsingData().then(function() {
|
| - this.clearingInProgress_ = false;
|
| - this.$.dialog.close();
|
| - }.bind(this));
|
| + this.browserProxy_.clearBrowsingData().then(
|
| + /**
|
| + * @param {boolean} shouldShowNotice Whether we should show the notice
|
| + * about other forms of browsing history before closing the dialog.
|
| + */
|
| + function(shouldShowNotice) {
|
| + this.clearingInProgress_ = false;
|
| + this.showOtherFormsOfBrowsingHistoryNotice_ = shouldShowNotice;
|
| +
|
| + if (!shouldShowNotice)
|
| + this.$.dialog.close();
|
| + }.bind(this));
|
| },
|
| +
|
| + /**
|
| + * Handles the closing of the notice about other forms of browsing history.
|
| + * @private
|
| + */
|
| + onOtherFormsOfBrowsingHistoryNoticeClose_: function() {
|
| + this.showOtherFormsOfBrowsingHistoryNotice_ = false;
|
| + this.$.dialog.close();
|
| + }
|
| });
|
|
|