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

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: Reworking. 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
« no previous file with comments | « Source/core/dom/Document.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 a5716fd7dbc086dff903cb28f1bda1c4de139793..594ad0b067bd94075f87b5c6151b5b766dfb7da1 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*);
+ ContentSecurityPolicy();
void applyPolicySideEffectsToExecutionContext();
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698