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 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); |
| }; |