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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js

Issue 2632553002: [DevTools] Clear local storage (Closed)
Patch Set: Addressed comments, moved the toolbar. Created 3 years, 11 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/resources/DOMStorageModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
index 436f62d38be02156d221c92f6761ab07d7d4eebc..5f2bf05f3c5e7933bd2073153836bb16a0069cc5 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
@@ -88,6 +88,13 @@ Resources.DOMStorage = class extends Common.Object {
removeItem(key) {
this._model._agent.removeDOMStorageItem(this.id, key);
}
+
+ clear() {
+ if (!this.isLocalStorage)
pfeldman 2017/01/19 23:38:45 Why?
eostroukhov 2017/01/20 19:24:00 Can't wipe session storage.
pfeldman 2017/01/20 19:27:31 sessionStorage.clear() works just fine for me.
eostroukhov 2017/01/20 19:45:49 Not sure what you are talking about. Open the Verg
+ return;
+ this._model._storageAgent.clearDataForOrigin(this._securityOrigin, 'local_storage');
+ this._model._domStorageItemsCleared(this.id);
+ }
};
@@ -114,6 +121,7 @@ Resources.DOMStorageModel = class extends SDK.SDKModel {
/** @type {!Object.<string, !Resources.DOMStorage>} */
this._storages = {};
this._agent = target.domstorageAgent();
+ this._storageAgent = target.storageAgent();
}
/**

Powered by Google App Engine
This is Rietveld 408576698