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 21d5e070a42b0dfaa8f2da0329e48759df2d5c1d..c8e0d80b92f88f34a360156345192d7cbdd87579 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp |
@@ -139,6 +139,12 @@ bool CSPDirectiveList::checkDynamic(SourceListDirective* directive) const |
return !directive || directive->allowDynamic(); |
} |
+void CSPDirectiveList::reportMixedContent(const KURL& mixedURL) const |
+{ |
+ if (strictMixedContentChecking()) |
+ m_policy->reportViolation(ContentSecurityPolicy::BlockAllMixedContent, ContentSecurityPolicy::BlockAllMixedContent, String(), mixedURL, m_reportEndpoints, m_header, ContentSecurityPolicy::URLViolation); |
+} |
+ |
bool CSPDirectiveList::checkSource(SourceListDirective* directive, const KURL& url, ContentSecurityPolicy::RedirectStatus redirectStatus) const |
{ |
// If |url| is empty, fall back to the policy URL to ensure that <object>'s |
@@ -639,18 +645,17 @@ void CSPDirectiveList::treatAsPublicAddress(const String& name, const String& va |
void CSPDirectiveList::enforceStrictMixedContentChecking(const String& name, const String& value) |
{ |
- if (m_reportOnly) { |
- m_policy->reportInvalidInReportOnly(name); |
- return; |
- } |
if (m_strictMixedContentCheckingEnforced) { |
m_policy->reportDuplicateDirective(name); |
return; |
} |
- m_strictMixedContentCheckingEnforced = true; |
- m_policy->enforceStrictMixedContentChecking(); |
if (!value.isEmpty()) |
m_policy->reportValueForEmptyDirective(name, value); |
+ |
+ m_strictMixedContentCheckingEnforced = true; |
+ |
+ if (!m_reportOnly) |
+ m_policy->enforceStrictMixedContentChecking(); |
} |
void CSPDirectiveList::enableInsecureRequestsUpgrade(const String& name, const String& value) |