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

Unified Diff: Source/core/frame/csp/ContentSecurityPolicy.h

Issue 27073003: CSP Suborigins Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address abarth's comments Created 6 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: Source/core/frame/csp/ContentSecurityPolicy.h
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h
index 19e165b049a742a2bc8b2c2634eb4ed84dfcbb8c..0bbe6e8a2a59040f04b7fb020fb2b67aea587e99 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -88,6 +88,9 @@ public:
// https://w3c.github.io/manifest/#content-security-policy
static const char ManifestSrc[];
+ // Experimental Directives (post CSP 1.1)
+ static const char Suborigin[];
+
enum ReportingStatus {
SendReport,
SuppressReport
@@ -167,6 +170,7 @@ public:
void reportInvalidPathCharacter(const String& directiveName, const String& value, const char);
void reportInvalidPluginTypes(const String&);
void reportInvalidSandboxFlags(const String&);
+ void reportInvalidSuboriginFlags(const String&);
void reportInvalidSourceExpression(const String& directiveName, const String& source);
void reportInvalidReflectedXSS(const String&);
void reportMissingReportURI(const String&);
@@ -185,6 +189,7 @@ public:
const KURL url() const;
void enforceSandboxFlags(SandboxFlags);
+ void enforceSuborigin(const String&);
String evalDisabledErrorMessage() const;
bool urlMatchesSelf(const KURL&) const;
@@ -226,6 +231,7 @@ private:
// State flags used to configure the environment after parsing a policy.
SandboxFlags m_sandboxMask;
+ String m_suboriginName;
ReferrerPolicy m_referrerPolicy;
String m_disableEvalErrorMessage;

Powered by Google App Engine
This is Rietveld 408576698