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

Unified Diff: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp

Issue 2002003002: Generate CSP violation reports for 'block-all-mixed-content' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
index b08f428013066e152ccc018b0e019b69c25e2559..1d2013a0a43f0d0e5cc0552acb6c0ce84500cdf5 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -315,6 +315,8 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, WebURLRequest::Req
return false;
MixedContentChecker::count(mixedFrame, requestContext);
+ if (ContentSecurityPolicy* policy = frame->securityContext()->contentSecurityPolicy())
+ policy->reportMixedContent(url);
Settings* settings = mixedFrame->settings();
// Use the current local frame's client; the embedder doesn't
@@ -405,6 +407,8 @@ bool MixedContentChecker::shouldBlockWebSocket(LocalFrame* frame, const KURL& ur
UseCounter::count(mixedFrame, UseCounter::MixedContentPresent);
UseCounter::count(mixedFrame, UseCounter::MixedContentWebSocket);
+ if (ContentSecurityPolicy* policy = frame->securityContext()->contentSecurityPolicy())
+ policy->reportMixedContent(url);
Settings* settings = mixedFrame->settings();
// Use the current local frame's client; the embedder doesn't

Powered by Google App Engine
This is Rietveld 408576698