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

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

Issue 559503002: CSP: Move policy parsing out of Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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 18e80a5300f7329e704f50854a18ae1fc3047491..4a81fb2fdc2994b01164be72ec0bf750d614a7de 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -91,21 +91,17 @@ public:
SuppressReport
};
- enum SideEffectDisposition {
- ApplySideEffectsToExecutionContext,
- DoNotApplySideEffectsToExecutionContext
- };
-
- static PassRefPtr<ContentSecurityPolicy> create(ExecutionContext* executionContext)
+ static PassRefPtr<ContentSecurityPolicy> create()
{
- return adoptRef(new ContentSecurityPolicy(executionContext));
+ return adoptRef(new ContentSecurityPolicy());
}
~ContentSecurityPolicy();
+ void bindToExecutionContext(ExecutionContext*);
void copyStateFrom(const ContentSecurityPolicy*);
void didReceiveHeaders(const ContentSecurityPolicyResponseHeaders&);
- void didReceiveHeader(const String&, ContentSecurityPolicyHeaderType, ContentSecurityPolicyHeaderSource, SideEffectDisposition = ApplySideEffectsToExecutionContext);
+ void didReceiveHeader(const String&, ContentSecurityPolicyHeaderType, ContentSecurityPolicyHeaderSource);
// These functions are wrong because they assume that there is only one header.
// FIXME: Replace them with functions that return vectors.
@@ -189,10 +185,8 @@ public:
static bool isDirectiveName(const String&);
- ExecutionContext* executionContext() const { return m_executionContext; }
-
private:
- explicit ContentSecurityPolicy(ExecutionContext*);
+ explicit ContentSecurityPolicy();
sof 2014/09/11 07:44:04 nit: drop explicit.
Mike West 2014/09/11 08:29:13 The bane of my existence. :)
void applyPolicySideEffectsToExecutionContext();

Powered by Google App Engine
This is Rietveld 408576698