Chromium Code Reviews| 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 6c343e60154f80e5b98e4d919150d79f18940337..a078c8516fb55efdbcd988d164054f15d653ae96 100644 |
| --- a/content/browser/frame_host/navigation_request.cc |
| +++ b/content/browser/frame_host/navigation_request.cc |
| @@ -669,9 +669,11 @@ void NavigationRequest::OnStartChecksComplete( |
| // Abort the request if needed. This will destroy the NavigationRequest. |
| if (result == NavigationThrottle::CANCEL_AND_IGNORE || |
| result == NavigationThrottle::CANCEL || |
| - result == NavigationThrottle::BLOCK_REQUEST) { |
| + result == NavigationThrottle::BLOCK_REQUEST || |
| + result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) { |
| // TODO(clamy): distinguish between CANCEL and CANCEL_AND_IGNORE. |
| - int error_code = result == NavigationThrottle::BLOCK_REQUEST |
| + int error_code = (result == NavigationThrottle::BLOCK_REQUEST || |
| + result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) |
|
alexmos
2017/04/11 06:00:29
Just a thought (not for this CL), but perhaps we c
engedy
2017/04/11 08:06:17
Happy to implement this in a follow-up CL if Camil
|
| ? net::ERR_BLOCKED_BY_CLIENT |
| : net::ERR_ABORTED; |
| // If the start checks completed synchronously, which could happen if there |
| @@ -774,7 +776,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 |
| @@ -782,9 +784,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; |