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

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

Issue 726563004: MixedContentChecker should not log blocked preload requests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test Created 6 years, 1 month 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/loader/MixedContentChecker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/MixedContentChecker.cpp
diff --git a/Source/core/loader/MixedContentChecker.cpp b/Source/core/loader/MixedContentChecker.cpp
index ea0c172a059dc2be2d59240bafc1023be6195208..a95506608316f069b44f0143160f2e87ba232705 100644
--- a/Source/core/loader/MixedContentChecker.cpp
+++ b/Source/core/loader/MixedContentChecker.cpp
@@ -213,7 +213,7 @@ void MixedContentChecker::logToConsole(LocalFrame* frame, const KURL& url, WebUR
}
// static
-bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequest& resourceRequest, const KURL& url)
+bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequest& resourceRequest, const KURL& url, MixedContentChecker::ReportingStatus reportingStatus)
{
// No frame, no mixed content:
if (!frame)
@@ -228,7 +228,7 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequ
return false;
LocalFrame* localTop = toLocalFrame(top);
- if (frame != localTop && shouldBlockFetch(localTop, resourceRequest, url))
+ if (frame != localTop && shouldBlockFetch(localTop, resourceRequest, url, reportingStatus))
return true;
}
@@ -280,7 +280,8 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequ
return true;
};
- logToConsole(frame, url, resourceRequest.requestContext(), allowed);
+ if (reportingStatus == SendReport)
+ logToConsole(frame, url, resourceRequest.requestContext(), allowed);
return !allowed;
}
« no previous file with comments | « Source/core/loader/MixedContentChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698