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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 2535383003: Collapse images disallowed by the Safe Browsing Subresource Filter. (Closed)
Patch Set: Initial draft. Created 4 years 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/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index b8e64992ef5c27b8b57bdf11fc69c58d37fd5df9..aef066598bf50243f2cbd2adde470b7780529778 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -87,8 +87,10 @@ ImageResource* ImageResource::fetch(FetchRequest& request,
fetcher->context().canRequest(Resource::Image,
request.resourceRequest(), requestURL,
request.options(), request.forPreload(),
- request.getOriginRestriction()))
+ request.getOriginRestriction()) ==
+ ResourceRequestBlockedReason::None) {
Mike West 2016/11/30 15:57:35 Nit: this is pretty ugly, but I'm not sure I have
engedy 2016/11/30 17:37:39 Introduced a helper variable, not sure it helped m
fetcher->context().sendImagePing(requestURL);
+ }
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698