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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Addressed comments from csharrison@. Created 3 years, 8 months 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: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index e4f6850a6c143a055c4fe7fabc3d3bed73a9043c..5c1ee769a04e289cd9cfd649ad47140d24687a33 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -677,7 +677,8 @@ void NavigationRequest::OnStartChecksComplete(
return;
}
- if (result == NavigationThrottle::BLOCK_REQUEST) {
+ if (result == NavigationThrottle::BLOCK_REQUEST ||
+ result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) {
OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT);
// DO NOT ADD CODE after this. The previous call to OnRequestFailed has
@@ -770,7 +771,7 @@ void NavigationRequest::OnRedirectChecksComplete(
// Abort the request if needed. This will destroy the NavigationRequest.
if (result == NavigationThrottle::CANCEL_AND_IGNORE ||
result == NavigationThrottle::CANCEL) {
- // TODO(clamy): distinguish between CANCEL and CANCEL_AND_IGNORE.
+ // TODO(clamy): distinguish between CANCEL and CANCEL_AND_IGNORE if needed.
OnRequestFailed(false, net::ERR_ABORTED);
// DO NOT ADD CODE after this. The previous call to OnRequestFailed has
@@ -778,9 +779,9 @@ void NavigationRequest::OnRedirectChecksComplete(
return;
}
- if (result == NavigationThrottle::BLOCK_REQUEST) {
+ if (result == NavigationThrottle::BLOCK_REQUEST ||
+ result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) {
OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT);
-
// DO NOT ADD CODE after this. The previous call to OnRequestFailed has
// destroyed the NavigationRequest.
return;

Powered by Google App Engine
This is Rietveld 408576698