| 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 95da7c8c41efdbdb04b95ea8411ba67430980a6d..5cef2cc79cb0fd6fc503168c23c1f60b155368df 100644
|
| --- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| @@ -140,6 +140,11 @@ bool CSPDirectiveList::checkDynamic(SourceListDirective* directive) const
|
| return !directive || directive->allowDynamic();
|
| }
|
|
|
| +void CSPDirectiveList::reportMixedContent(const KURL& mixedURL) const
|
| +{
|
| + 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
|
| @@ -640,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)
|
|
|