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

Unified Diff: public/web/WebSecurityPolicy.h

Issue 730203007: CSP: Permit exempting schemes only for certain policy areas. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add ASSERT(policyAreas != PolicyAreaNone) Created 6 years, 1 month 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
« no previous file with comments | « Source/web/WebSecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebSecurityPolicy.h
diff --git a/public/web/WebSecurityPolicy.h b/public/web/WebSecurityPolicy.h
index dc834c1d96f2b75cfc9124fd32e1f3a5b1a506c5..6c11f41d98d56128f81dd994cf1355ee5abd9935 100644
--- a/public/web/WebSecurityPolicy.h
+++ b/public/web/WebSecurityPolicy.h
@@ -67,6 +67,17 @@ public:
// Registers a URL scheme whose resources can be loaded regardless of a page's Content Security Policy.
BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(const WebString&);
+ // Registers a URL scheme for which some kinds of resources bypass Content Security Policy.
+ // This enum should be kept in sync with Source/platform/weborigin/SchemeRegistry.h.
Mike West 2014/11/18 20:35:46 Can you add something to Source/web/AssertMatching
+ enum PolicyAreas : uint32_t {
+ PolicyAreaNone = 0,
+ PolicyAreaImage = 1 << 0,
+ PolicyAreaStyle = 1 << 1,
+ // Add more policy areas as needed by clients.
+ PolicyAreaAll = ~static_cast<uint32_t>(0),
+ };
+ BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme, PolicyAreas);
+
// Registers a URL scheme as strictly empty documents, allowing them to
// commit synchronously.
BLINK_EXPORT static void registerURLSchemeAsEmptyDocument(const WebString&);
« no previous file with comments | « Source/web/WebSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698