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

Unified Diff: Source/core/page/ContentSecurityPolicy.h

Issue 19940002: [HTML Import] Respect Content Security Policy Model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Mac build failure Created 7 years, 5 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/loader/cache/ResourceFetcher.cpp ('k') | Source/core/page/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/ContentSecurityPolicy.h
diff --git a/Source/core/page/ContentSecurityPolicy.h b/Source/core/page/ContentSecurityPolicy.h
index 35760a7fa808889bc4f627a89c81a119fb7b31d8..7e09483d5e4fa37145a4f5d467a4298240360ee9 100644
--- a/Source/core/page/ContentSecurityPolicy.h
+++ b/Source/core/page/ContentSecurityPolicy.h
@@ -41,12 +41,30 @@ namespace WebCore {
class CSPDirectiveList;
class DOMStringList;
class KURL;
+class ResourceResponse;
class ScriptExecutionContext;
class SecurityOrigin;
typedef int SandboxFlags;
typedef Vector<OwnPtr<CSPDirectiveList> > CSPDirectiveListVector;
+class ContentSecurityPolicyResponseHeaders {
+public:
+ ContentSecurityPolicyResponseHeaders() { }
+ explicit ContentSecurityPolicyResponseHeaders(const ResourceResponse&);
+
+ const String& contentSecurityPolicy() const { return m_contentSecuitryPolicy; }
+ const String& contentSecurityPolicyReportOnly() const { return m_contentSecurityPolicyReportOnly; }
+ const String& xWebKitCSP() const { return m_xWebKitCSP; }
+ const String& xWebKitCSPReportOnly() const { return m_xWebKitCSPReportOnly; }
+
+private:
+ String m_contentSecuitryPolicy;
+ String m_contentSecurityPolicyReportOnly;
+ String m_xWebKitCSP;
+ String m_xWebKitCSPReportOnly;
+};
+
class ContentSecurityPolicy {
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -79,6 +97,7 @@ public:
BlockReflectedXSS
};
+ void didReceiveHeaders(const ContentSecurityPolicyResponseHeaders&);
void didReceiveHeader(const String&, HeaderType);
// These functions are wrong because they assume that there is only one header.
@@ -141,6 +160,7 @@ private:
explicit ContentSecurityPolicy(ScriptExecutionContext*);
void logToConsole(const String& message, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const;
+ void addPolicyFromHeaderValue(const String&, HeaderType);
ScriptExecutionContext* m_scriptExecutionContext;
bool m_overrideInlineStyleAllowed;
« no previous file with comments | « Source/core/loader/cache/ResourceFetcher.cpp ('k') | Source/core/page/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698