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

Unified Diff: Source/core/fetch/ResourceFetcher.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
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 69fa5bb29ba1be880310e32aefe94d85927510e9..5b907c9f9fd31b824a2c78f3c6e56a9e7afab6d7 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -591,7 +591,9 @@ bool ResourceFetcher::canRequest(Resource::Type type, const ResourceRequest& res
effectiveFrame = toLocalFrame(frame()->tree().parent());
}
- return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url);
+ MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ?
+ MixedContentChecker::SuppressReport : MixedContentChecker::SendReport;
+ return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url, mixedContentReporting);
}
bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sourceOrigin, const KURL& url) const
@@ -674,7 +676,8 @@ void ResourceFetcher::maybeNotifyInsecureContent(const Resource* resource) const
// As a side effect browser will be notified.
MixedContentChecker::shouldBlockFetch(frame(),
resource->lastResourceRequest(),
- resource->lastResourceRequest().url());
+ resource->lastResourceRequest().url(),
+ MixedContentChecker::SendReport);
}
// Limit the number of URLs in m_validatedURLs to avoid memory bloat.
@@ -1261,8 +1264,7 @@ void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const
// Loading images involves several special cases, so use dedicated fetch method instead.
if (type == Resource::Image)
resource = fetchImage(request);
-
- if (!resource)
+ else
resource = requestResource(type, request);
if (!resource || (m_preloads && m_preloads->contains(resource.get())))
return;

Powered by Google App Engine
This is Rietveld 408576698