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

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: 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
Index: Source/core/loader/MixedContentChecker.cpp
diff --git a/Source/core/loader/MixedContentChecker.cpp b/Source/core/loader/MixedContentChecker.cpp
index ea0c172a059dc2be2d59240bafc1023be6195208..6ff2f61a86a7248abff63bb19d800b67c3ff1558 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::SuppressLogType suppressLog)
{
// 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, suppressLog))
return true;
}
@@ -280,7 +280,8 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequ
return true;
};
- logToConsole(frame, url, resourceRequest.requestContext(), allowed);
+ if (suppressLog != SuppressLog)
Mike West 2014/11/14 08:08:17 Nit: I find `== LogIfBlocked` clearer than the dou
kouhei (in TOK) 2014/11/14 09:19:31 Done.
+ logToConsole(frame, url, resourceRequest.requestContext(), allowed);
return !allowed;
}
« Source/core/loader/MixedContentChecker.h ('K') | « Source/core/loader/MixedContentChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698