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

Unified Diff: content/public/browser/dom_storage_context.h

Issue 2403713002: Add suborigin logic to url::Origin (Closed)
Patch Set: Clarify DeleteLocalStorage API Created 4 years, 2 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: content/public/browser/dom_storage_context.h
diff --git a/content/public/browser/dom_storage_context.h b/content/public/browser/dom_storage_context.h
index a4aba1e91e1b4f384a0e0eaa9891b8d6e062965c..c69723e61c453e3a72eac630eefc08df12af9fb8 100644
--- a/content/public/browser/dom_storage_context.h
+++ b/content/public/browser/dom_storage_context.h
@@ -40,6 +40,17 @@ class DOMStorageContext {
const GetSessionStorageUsageCallback& callback) = 0;
// Deletes the local storage data for the given origin.
+ //
+ // |origin| must not be a suborigin. For the given origin, it will delete
+ // all localStorage associated with suborigins at the physical origin of
+ // |origin|. (that is, deletion of http://example.com will also delete
+ // http-so://foo.example.com). See
+ // https://w3c.github.io/webappsec-suborigins/.
+ virtual void DeleteLocalStorageForPhysicalOrigin(const GURL& origin) = 0;
+
+ // Same as above, but extracts the physical origin from |origin| to do the
+ // deletion, so it is unnecessary to guarantee that |origin| doesn't have a
+ // suborigin.
virtual void DeleteLocalStorage(const GURL& origin) = 0;
michaeln 2016/10/21 23:07:12 Looking at this again i think we should retain the
jww 2016/10/22 00:43:12 Done.
// Deletes the session storage data identified by |usage_info|.

Powered by Google App Engine
This is Rietveld 408576698