Index: Source/core/frame/csp/ContentSecurityPolicy.h |
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h |
index 1d5721960d2d2bb627722177fb7cbbfbae25402a..b7af2b44a13341fbe87cc5639a9e379ba9fd1edc 100644 |
--- a/Source/core/frame/csp/ContentSecurityPolicy.h |
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h |
@@ -98,7 +98,7 @@ public: |
}; |
void didReceiveHeaders(const ContentSecurityPolicyResponseHeaders&); |
- void didReceiveHeader(const String&, ContentSecurityPolicyHeaderType, ContentSecurityPolicyHeaderSource); |
+ void didReceiveHeader(const String&, ContentSecurityPolicyHeaderType, ContentSecurityPolicyHeaderSource, bool shouldApplySideEffects = true); |
jochen (gone - plz use gerrit)
2014/09/09 08:08:34
can this be an enum instead of a bool?
jochen (gone - plz use gerrit)
2014/09/09 08:08:34
can this be an enum instead of a bool?
Mike West
2014/09/09 09:12:02
Certainly (though I intend to drop it entirely in
|
// These functions are wrong because they assume that there is only one header. |
// FIXME: Replace them with functions that return vectors. |
@@ -169,7 +169,7 @@ public: |
const KURL url() const; |
KURL completeURL(const String&) const; |
- void enforceSandboxFlags(SandboxFlags) const; |
+ void enforceSandboxFlags(SandboxFlags); |
String evalDisabledErrorMessage() const; |
bool urlMatchesSelf(const KURL&) const; |
@@ -186,6 +186,8 @@ public: |
private: |
explicit ContentSecurityPolicy(ExecutionContext*); |
+ void applyPolicySideEffectsToExecutionContext(); |
+ |
Document* document() const; |
SecurityOrigin* securityOrigin() const; |
@@ -207,6 +209,12 @@ private: |
uint8_t m_scriptHashAlgorithmsUsed; |
uint8_t m_styleHashAlgorithmsUsed; |
+ // State flags used to configure the environment after parsing a policy. |
+ SandboxFlags m_sandboxMask; |
+ bool m_setReferrerPolicy; |
+ ReferrerPolicy m_referrerPolicy; |
+ String m_disableEvalErrorMessage; |
+ |
OwnPtr<CSPSource> m_selfSource; |
}; |