Chromium Code Reviews| Index: chrome/browser/browsing_data_helper.h |
| diff --git a/chrome/browser/browsing_data_helper.h b/chrome/browser/browsing_data_helper.h |
| index ea7a486c61d861f091522cba938848586b88fc01..ae05f1c08e59641f0a1c3a4a5ce3bd6aaf75cae8 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. |
|
Evan Stade
2012/06/01 17:17:02
nit: Comments should be capitalized. Also I think
|
| + 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 |
| @@ -33,6 +40,11 @@ class BrowsingDataHelper { |
| static bool IsExtensionScheme(const WebKit::WebString& scheme); |
| static bool HasExtensionScheme(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); |
| }; |