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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.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/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 a256a0a8ee4084cdbb9c388a108377faabefaa58..ea87c7b0c54b77da56714d4fdbc01b548a5f8714 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
@@ -144,6 +144,17 @@ WebInspector.DOMStorageModel.prototype = {
},
/**
+ * @param {string} origin
+ */
+ clearForOrigin: function(origin)
+ {
+ if (!this._enabled)
+ return;
+ this._removeOrigin(origin);
+ this._addOrigin(origin);
+ },
+
+ /**
* @param {!WebInspector.Event} event
*/
_securityOriginAdded: function(event)
@@ -151,7 +162,6 @@ WebInspector.DOMStorageModel.prototype = {
this._addOrigin(/** @type {string} */ (event.data));
},
-
/**
* @param {string} securityOrigin
*/
@@ -175,7 +185,14 @@ WebInspector.DOMStorageModel.prototype = {
*/
_securityOriginRemoved: function(event)
{
- var securityOrigin = /** @type {string} */ (event.data);
+ this._removeOrigin(/** @type {string} */ (event.data));
+ },
+
+ /**
+ * @param {string} securityOrigin
+ */
+ _removeOrigin: function(securityOrigin)
+ {
var localStorageKey = this._storageKey(securityOrigin, true);
var localStorage = this._storages[localStorageKey];
console.assert(localStorage);

Powered by Google App Engine
This is Rietveld 408576698