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

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

Issue 332993002: Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/frame/csp/CSPDirectiveList.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 5aee0ea2ef5bdff5259bb08140f6275bfbd1cbe1..5787ac0f08b0d206d0b945bf6cd5a38365c9f277 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -28,6 +28,7 @@
#include "bindings/v8/ScriptState.h"
#include "core/dom/Document.h"
+#include "core/dom/ExecutionContext.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/network/HTTPParsers.h"
#include "platform/weborigin/ReferrerPolicy.h"
@@ -51,7 +52,6 @@ class CSPDirectiveList;
class DOMStringList;
class JSONObject;
class KURL;
-class ExecutionContextClient;
class SecurityOrigin;
typedef int SandboxFlags;
@@ -82,9 +82,9 @@ public:
static const char ReflectedXSS[];
static const char Referrer[];
- static PassRefPtr<ContentSecurityPolicy> create(ExecutionContextClient* client)
+ static PassRefPtr<ContentSecurityPolicy> create(ExecutionContext* executionContext)
{
- return adoptRef(new ContentSecurityPolicy(client));
+ return adoptRef(new ContentSecurityPolicy(executionContext));
}
~ContentSecurityPolicy();
@@ -173,11 +173,11 @@ public:
static bool isDirectiveName(const String&);
- ExecutionContextClient* client() const { return m_client; }
- Document* document() const { return client()->isDocument() ? toDocument(client()) : 0; }
+ ExecutionContext* executionContext() const { return m_executionContext; }
+ Document* document() const { return executionContext()->isDocument() ? toDocument(executionContext()) : 0; }
tyoshino (SeeGerritForStatus) 2014/06/13 10:46:47 updated to use m_executionContext
private:
- explicit ContentSecurityPolicy(ExecutionContextClient*);
+ explicit ContentSecurityPolicy(ExecutionContext*);
void logToConsole(const String& message) const;
void addPolicyFromHeaderValue(const String&, ContentSecurityPolicyHeaderType, ContentSecurityPolicyHeaderSource);
@@ -185,7 +185,7 @@ private:
bool shouldSendViolationReport(const String&) const;
void didSendViolationReport(const String&);
- ExecutionContextClient* m_client;
+ ExecutionContext* m_executionContext;
haraken 2014/06/13 09:09:21 Just to confirm: Before this CL, it was guaranteed
tyoshino (SeeGerritForStatus) 2014/06/13 09:29:16 Even after this CL, m_executionContext here never
bool m_overrideInlineStyleAllowed;
CSPDirectiveListVector m_policies;
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698