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

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: 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 | « no previous file | Source/core/loader/MixedContentChecker.h » ('j') | Source/core/loader/MixedContentChecker.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 68f29110590e6be5b393177aaab507a390eda98f..5269ee4862e45dc128fe19dc94beac0b38f50871 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -591,7 +591,8 @@ bool ResourceFetcher::canRequest(Resource::Type type, const ResourceRequest& res
effectiveFrame = toLocalFrame(frame()->tree().parent());
}
- return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url);
+ MixedContentChecker::SuppressLogType suppressLog = forPreload ? MixedContentChecker::SuppressLog : MixedContentChecker::LogIfBlocked;
+ return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url, suppressLog);
}
bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sourceOrigin, const KURL& url) const
@@ -674,7 +675,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::LogIfBlocked);
}
void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest& request, ResourceLoadStartType type)
@@ -1254,8 +1256,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
Mike West 2014/11/14 08:08:17 Why this change?
kouhei (in TOK) 2014/11/14 09:19:31 When fetchImage fails from CSP/mixedContent check,
resource = requestResource(type, request);
if (!resource || (m_preloads && m_preloads->contains(resource.get())))
return;
« no previous file with comments | « no previous file | Source/core/loader/MixedContentChecker.h » ('j') | Source/core/loader/MixedContentChecker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698