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

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

Issue 1109633002: Basic experimental suborigin CSP directive and SecurityOrigin mods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on ToT Created 5 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
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.h
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h
index 7179f796a5ea3b44a052f52361a8dd54b65d4d7f..7360053cf5e137ebb7e4adbe2733c9e9dd73e631 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -101,6 +101,10 @@ public:
// https://w3c.github.io/webappsec/specs/upgrade/
static const char UpgradeInsecureRequests[];
+ // Suborigin Directive
+ // https://metromoxie.github.io/webappsec/specs/suborigins/index.html
+ static const char Suborigin[];
+
enum ReportingStatus {
SendReport,
SuppressReport
@@ -204,6 +208,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&);
@@ -212,6 +217,7 @@ public:
void reportInvalidReferrer(const String&);
void reportReportOnlyInMeta(const String&);
void reportMetaOutsideHead(const String&);
+ void reportSuboriginInMeta(const String&);
void reportValueForEmptyDirective(const String& directiveName, const String& value);
// If a frame is passed in, the report will be sent using it as a context. If no frame is
@@ -223,6 +229,7 @@ public:
const KURL url() const;
void enforceSandboxFlags(SandboxFlags);
+ void enforceSuborigin(const String&);
void enforceStrictMixedContentChecking();
String evalDisabledErrorMessage() const;
@@ -279,6 +286,7 @@ private:
// State flags used to configure the environment after parsing a policy.
SandboxFlags m_sandboxMask;
+ String m_suboriginName;
bool m_enforceStrictMixedContentChecking;
ReferrerPolicy m_referrerPolicy;
String m_disableEvalErrorMessage;
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698