| 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 7351dbcd2b4ca371eb1c4e2044d51cc85e11b74a..32929c37b0226c075f8327554a31ad522b151620 100644
|
| --- a/content/browser/frame_host/navigation_request.cc
|
| +++ b/content/browser/frame_host/navigation_request.cc
|
| @@ -383,17 +383,7 @@ void NavigationRequest::OnResponseStarted(
|
| DCHECK(state_ == STARTED);
|
| state_ = RESPONSE_STARTED;
|
|
|
| - // HTTP 204 (No Content) and HTTP 205 (Reset Content) responses should not
|
| - // commit; they leave the frame showing the previous page.
|
| DCHECK(response);
|
| - if (response->head.headers.get() &&
|
| - (response->head.headers->response_code() == 204 ||
|
| - response->head.headers->response_code() == 205)) {
|
| - frame_tree_node_->navigator()->DiscardPendingEntryIfNeeded(
|
| - navigation_handle_.get());
|
| - frame_tree_node_->ResetNavigationRequest(false);
|
| - return;
|
| - }
|
|
|
| // Update the service worker params of the request params.
|
| bool did_create_service_worker_host =
|
| @@ -570,9 +560,13 @@ void NavigationRequest::OnWillProcessResponseChecksComplete(
|
| CHECK(result != NavigationThrottle::DEFER);
|
|
|
| // 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.
|
| + if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
|
| + frame_tree_node_->navigator()->DiscardPendingEntryIfNeeded(
|
| + navigation_handle_.get());
|
| + frame_tree_node_->ResetNavigationRequest(false);
|
| + return;
|
| + }
|
| + if (result == NavigationThrottle::CANCEL) {
|
| frame_tree_node_->ResetNavigationRequest(false);
|
| return;
|
| }
|
|
|