| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'site-data' handles showing the local storage summary list for all sites. | 7 * 'site-data' handles showing the local storage summary list for all sites. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 }, | 74 }, |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * Shows a dialog to confirm the deletion of multiple sites. | 77 * Shows a dialog to confirm the deletion of multiple sites. |
| 78 * @param {!Event} e | 78 * @param {!Event} e |
| 79 * @private | 79 * @private |
| 80 */ | 80 */ |
| 81 onConfirmDeleteMultipleSites_: function(e) { | 81 onConfirmDeleteMultipleSites_: function(e) { |
| 82 e.preventDefault(); | 82 e.preventDefault(); |
| 83 this.idToDelete_ = ''; // Delete all. | 83 this.idToDelete_ = ''; // Delete all. |
| 84 this.confirmationDeleteMsg_ = loadTimeData.getString( | 84 this.confirmationDeleteMsg_ = |
| 85 'siteSettingsCookieRemoveMultipleConfirmation'); | 85 loadTimeData.getString('siteSettingsCookieRemoveMultipleConfirmation'); |
| 86 this.$.confirmDeleteDialog.showModal(); | 86 this.$.confirmDeleteDialog.showModal(); |
| 87 }, | 87 }, |
| 88 | 88 |
| 89 /** | 89 /** |
| 90 * Called when deletion for a single/multiple sites has been confirmed. | 90 * Called when deletion for a single/multiple sites has been confirmed. |
| 91 * @private | 91 * @private |
| 92 */ | 92 */ |
| 93 onConfirmDelete_: function() { | 93 onConfirmDelete_: function() { |
| 94 if (this.idToDelete_ != '') | 94 if (this.idToDelete_ != '') |
| 95 this.onDeleteSite_(); | 95 this.onDeleteSite_(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 113 onDeleteMultipleSites_: function() { | 113 onDeleteMultipleSites_: function() { |
| 114 if (this.filterString_.length == 0) { | 114 if (this.filterString_.length == 0) { |
| 115 this.removeAllCookies(); | 115 this.removeAllCookies(); |
| 116 } else { | 116 } else { |
| 117 var items = this.$.list.items; | 117 var items = this.$.list.items; |
| 118 for (var i = 0; i < items.length; ++i) { | 118 for (var i = 0; i < items.length; ++i) { |
| 119 if (this.showItem_(items[i])) | 119 if (this.showItem_(items[i])) |
| 120 this.browserProxy.removeCookie(items[i].id); | 120 this.browserProxy.removeCookie(items[i].id); |
| 121 } | 121 } |
| 122 // We just deleted all items found by the filter, let's reset the filter. | 122 // We just deleted all items found by the filter, let's reset the filter. |
| 123 /** @type {SettingsSubpageSearchElement} */(this.$.filter).setValue(''); | 123 /** @type {SettingsSubpageSearchElement} */ (this.$.filter).setValue(''); |
| 124 } | 124 } |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * @param {!{model: !{item: CookieDataSummaryItem}}} event | 128 * @param {!{model: !{item: CookieDataSummaryItem}}} event |
| 129 * @private | 129 * @private |
| 130 */ | 130 */ |
| 131 onSiteTap_: function(event) { | 131 onSiteTap_: function(event) { |
| 132 settings.navigateTo(settings.Route.SITE_SETTINGS_DATA_DETAILS, | 132 settings.navigateTo( |
| 133 settings.Route.SITE_SETTINGS_DATA_DETAILS, |
| 133 new URLSearchParams('site=' + event.model.item.site)); | 134 new URLSearchParams('site=' + event.model.item.site)); |
| 134 }, | 135 }, |
| 135 }); | 136 }); |
| OLD | NEW |