Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js b/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| index d9ea2970247dca6cb03eb0e6d5a04e6f1957811d..1d94f459b7a1bdfe4394b1824e3e52a604615860 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| @@ -74,6 +74,13 @@ Resources.CookieItemsView = class extends Resources.StorageItemsView { |
| } |
| /** |
| + * @param {!SDK.Cookie} cookie |
| + */ |
| + _deleteCookie(cookie) { |
| + this._model.deleteCookie(cookie, () => this.refreshItems()); |
| + } |
| + |
| + /** |
| * @param {!Array.<!SDK.Cookie>} allCookies |
| */ |
| _updateWithCookies(allCookies) { |
| @@ -83,7 +90,8 @@ Resources.CookieItemsView = class extends Resources.StorageItemsView { |
| const parsedURL = this._cookieDomain.asParsedURL(); |
| const domain = parsedURL ? parsedURL.host : ''; |
| this._cookiesTable = new CookieTable.CookiesTable( |
| - this._saveCookie.bind(this), this.refreshItems.bind(this), () => this.setCanDeleteSelected(true), domain); |
| + this._saveCookie.bind(this), this.refreshItems.bind(this), () => this.setCanDeleteSelected(true), |
| + this._deleteCookie.bind(this), domain); |
| } |
| var shownCookies = this.filter(allCookies, cookie => `${cookie.name()} ${cookie.value()} ${cookie.domain()}`); |
| @@ -105,9 +113,7 @@ Resources.CookieItemsView = class extends Resources.StorageItemsView { |
| * @override |
| */ |
| deleteSelectedItem() { |
| - var selectedCookie = this._cookiesTable.selectedCookie(); |
| - if (selectedCookie) |
| - this._model.deleteCookie(selectedCookie, () => this.refreshItems()); |
| + this._cookiesTable.removeSelectedCookie(); |
|
eostroukhov
2017/02/24 18:13:46
The call ultimately gets back to this view. Maybe
phulce
2017/02/28 18:55:53
Done, sort key wasn't robust enough to handle all
|
| } |
| /** |