| Index: chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
|
| diff --git a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
|
| index 1bf1018d81c7ef49e0b2cf70fa0678a4b431faa4..9bfbdb0b6dc5c89d0975233f400c4a906509c776 100644
|
| --- a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
|
| +++ b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
|
| @@ -57,6 +57,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Closes the dialog, if open.
|
| + */
|
| + close: function() {
|
| + var dialog = /** @type {!CrDialogElement} */(this.$.dialog);
|
| + if (dialog.open)
|
| + dialog.close();
|
| + },
|
| +
|
| + /**
|
| * Populates the dialog with the data about the site.
|
| * @private
|
| */
|
| @@ -128,8 +137,8 @@ Polymer({
|
| */
|
| onTreeItemRemoved_: function(args) {
|
| this.entries_ = this.site_.getCookieList();
|
| - if (args.id == this.site_.data_.id || this.entries_.length == 0) {
|
| - this.$.dialog.close();
|
| + if (this.site_.children_.length == 0 || this.entries_.length == 0) {
|
| + this.close();
|
| return;
|
| }
|
|
|
| @@ -183,7 +192,7 @@ Polymer({
|
| onRemoveAll_: function(event) {
|
| cr.removeWebUIListener(this.listener_);
|
| this.browserProxy.removeCookie(this.site_.data_.id);
|
| - this.$.dialog.close();
|
| + this.close();
|
| },
|
|
|
| /** @private */
|
|
|