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

Unified Diff: chrome/browser/browsing_data_helper.h

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: How's this direction? Created 8 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: chrome/browser/browsing_data_helper.h
diff --git a/chrome/browser/browsing_data_helper.h b/chrome/browser/browsing_data_helper.h
index 68a3e8e9892adb7600e7acfa3d0cd165cf6fa88a..cf7634cd5497e1425cf97ef6938247ee3cf0a44d 100644
--- a/chrome/browser/browsing_data_helper.h
+++ b/chrome/browser/browsing_data_helper.h
@@ -16,10 +16,17 @@ namespace WebKit {
class WebString;
}
+class ExtensionSpecialStoragePolicy;
class GURL;
class BrowsingDataHelper {
public:
+ enum OriginSetMask {
+ UNPROTECTED_WEB = 1 << 0, // drive-by web.
Bernhard Bauer 2012/05/31 15:57:31 Nit: Can you line up the comments (and set them at
Mike West 2012/06/01 13:35:17 Done.
Bernhard Bauer 2012/06/01 13:59:35 O RLY? ;-)
Mike West 2012/06/01 14:11:53 It was done in my head. Now it's done in code. SR
+ PROTECTED_WEB = 1 << 1, // hosted applications.
+ EXTENSION = 1 << 2, // chrome-extension://*
+ };
+
// Returns true iff the provided scheme is (really) web safe, and suitable
// for treatment as "browsing data". This relies on the definition of web safe
// in ChildProcessSecurityPolicy, but excluding schemes like
@@ -28,6 +35,11 @@ class BrowsingDataHelper {
static bool IsValidScheme(const WebKit::WebString& scheme);
static bool HasValidScheme(const GURL& origin);
+ // Returns true if the provided origin matches the provided mask.
+ static bool DoesOriginMatchMask(const GURL& origin,
+ int origin_set_mask,
+ ExtensionSpecialStoragePolicy* policy);
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(BrowsingDataHelper);
};

Powered by Google App Engine
This is Rietveld 408576698