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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceError.cpp

Issue 2535383003: Collapse images disallowed by the Safe Browsing Subresource Filter. (Closed)
Patch Set: Rebase. 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/platform/network/ResourceError.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceError.cpp b/third_party/WebKit/Source/platform/network/ResourceError.cpp
index 6cd3966e7ef79fe4c348dc79df4001ee481ec611..7c6e30477584fd518d89677c395fe3bdded00e16 100644
--- a/third_party/WebKit/Source/platform/network/ResourceError.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceError.cpp
@@ -26,6 +26,7 @@
#include "platform/network/ResourceError.h"
+#include "platform/network/ResourceRequest.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/Platform.h"
#include "public/platform/WebURL.h"
@@ -40,9 +41,12 @@ ResourceError ResourceError::cancelledError(const String& failingURL) {
}
ResourceError ResourceError::cancelledDueToAccessCheckError(
- const String& failingURL) {
+ const String& failingURL,
+ ResourceRequestBlockedReason blockedReason) {
ResourceError error = cancelledError(failingURL);
error.setIsAccessCheck(true);
+ if (blockedReason == ResourceRequestBlockedReason::SubresourceFilter)
+ error.setShouldCollapseInitiator(true);
return error;
}

Powered by Google App Engine
This is Rietveld 408576698