Index: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
index 4a0915fe03ff304d9f9ea09cdd68f5aa7dda286c..280a00e946b7d47687df9ab1f13c6e96d28dec34 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
@@ -129,6 +129,11 @@ bool CSPDirectiveList::checkHash(SourceListDirective* directive, const CSPHashVa |
return !directive || directive->allowHash(hashValue); |
} |
+bool CSPDirectiveList::checkDynamic(SourceListDirective* directive) const |
+{ |
+ return !directive || directive->allowDynamic(); |
+} |
+ |
bool CSPDirectiveList::checkSource(SourceListDirective* directive, const KURL& url, ContentSecurityPolicy::RedirectStatus redirectStatus) const |
{ |
return !directive || directive->allows(url, redirectStatus); |
@@ -412,6 +417,11 @@ bool CSPDirectiveList::allowStyleHash(const CSPHashValue& hashValue) const |
return checkHash(operativeDirective(m_styleSrc.get()), hashValue); |
} |
+bool CSPDirectiveList::allowDynamic() const |
+{ |
+ return checkDynamic(operativeDirective(m_scriptSrc.get())); |
+} |
+ |
const String& CSPDirectiveList::pluginTypesText() const |
{ |
ASSERT(hasPluginTypes()); |