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 9f676eb677e923edb349021448e6600222f3df1e..ebb1f327511e7a20f494a2200d27bbf3302d1dce 100644 |
| --- a/content/browser/frame_host/navigation_request.cc |
| +++ b/content/browser/frame_host/navigation_request.cc |
| @@ -580,6 +580,14 @@ void NavigationRequest::OnStartChecksComplete( |
| return; |
| } |
| + if (result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) { |
| + frame_tree_node_->SetFrameOwnerCollapsedState(true); |
|
clamy
2017/01/18 15:10:55
Suggestion: maybe we could move this to the Naviga
engedy
2017/01/18 23:37:14
Done.
|
| + OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT); |
|
clamy
2017/01/18 15:10:55
Just checking: this means we will attempt to load
engedy
2017/01/18 23:37:14
Yep, it is intended that we navigate away from the
|
| + // DO NOT ADD CODE after this. The previous call to OnRequestFailed has |
| + // destroyed the NavigationRequest. |
| + return; |
| + } |
| + |
| // Use the SiteInstance of the navigating RenderFrameHost to get access to |
| // the StoragePartition. Using the url of the navigation will result in a |
| // wrong StoragePartition being picked when a WebView is navigating. |
| @@ -666,6 +674,14 @@ void NavigationRequest::OnRedirectChecksComplete( |
| return; |
| } |
| + if (result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) { |
| + frame_tree_node_->SetFrameOwnerCollapsedState(true); |
| + OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT); |
| + // DO NOT ADD CODE after this. The previous call to OnRequestFailed has |
| + // destroyed the NavigationRequest. |
| + return; |
| + } |
| + |
| loader_->FollowRedirect(); |
| } |