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

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

Issue 550223002: CSP: Separate side-effects of parsing from the parsing code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 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;
};
« no previous file with comments | « no previous file | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698