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 74b1d1141472261a12a81f48b0941f407d3b4825..cebb4f8750f9cfcd1e907b8232bbd8e3d0d0b48d 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js |
| @@ -56,13 +56,6 @@ Resources.CookieItemsView = class extends UI.SimpleView { |
| this._treeElement = treeElement; |
| this._cookieDomain = cookieDomain; |
| - this._emptyWidget = new UI.EmptyWidget( |
| - cookieDomain ? |
|
dgozman
2017/01/20 01:54:51
Let's only show cookies for http:// and https:// o
kdzwinel
2017/01/21 02:12:20
It looks like it's possible to set cookies on file
|
| - Common.UIString('This site has no cookies.') : |
| - Common.UIString( |
| - 'By default cookies are disabled for local files.\nYou could override this by starting the browser with --enable-file-cookies command line flag.')); |
| - this._emptyWidget.show(this.element); |
| - |
| this.element.addEventListener('contextmenu', this._contextMenu.bind(this), true); |
| } |
| @@ -107,25 +100,15 @@ Resources.CookieItemsView = class extends UI.SimpleView { |
| _updateWithCookies(allCookies) { |
| this._cookies = this._filterCookiesForDomain(allCookies); |
| - if (!this._cookies.length) { |
| - // Nothing to show. |
| - this._emptyWidget.show(this.element); |
| - this._filterButton.setEnabled(false); |
| - this._clearButton.setEnabled(false); |
| - this._deleteButton.setEnabled(false); |
| - if (this._cookiesTable) |
| - this._cookiesTable.detach(); |
| - return; |
| - } |
| - |
| if (!this._cookiesTable) { |
| + const parsedURL = this._cookieDomain.asParsedURL(); |
| + const domain = parsedURL ? parsedURL.domain() : ''; |
| this._cookiesTable = |
| - new CookieTable.CookiesTable(false, this._update.bind(this), this._enableDeleteButton.bind(this)); |
| + new CookieTable.CookiesTable(false, this._update.bind(this), this._enableDeleteButton.bind(this), domain); |
| } |
| var shownCookies = this._filterCookiesForFilters(this._cookies); |
| this._cookiesTable.setCookies(shownCookies); |
| - this._emptyWidget.detach(); |
| this._cookiesTable.show(this.element); |
| this._filterBar.show(this.element); |
| this._treeElement.subtitle = |