Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js

Issue 1960663003: DevTools: introduce the Clear storage pane in the resources panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests fixed Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js
index 7803bc8fe5cc5e00c28a42a68810729529418cc7..722cc8a976da9de835017541499a90246af6d7f1 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js
@@ -40,8 +40,20 @@ WebInspector.ServiceWorkerCacheModel.prototype = {
this._enabled = true;
},
+ /**
+ * @param {string} origin
+ */
+ clearForOrigin: function(origin)
+ {
+ this._removeOrigin(origin);
+ this._addOrigin(origin);
+ },
+
refreshCacheNames: function()
{
+ for (var cache of this._caches.values())
+ this._cacheRemoved(cache);
+ this._caches.clear();
var securityOrigins = this.target().resourceTreeModel.securityOrigins();
for (var securityOrigin of securityOrigins)
this._loadCacheNames(securityOrigin);

Powered by Google App Engine
This is Rietveld 408576698