| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/frame_host/navigation_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "content/browser/appcache/appcache_navigation_handle.h" | 10 #include "content/browser/appcache/appcache_navigation_handle.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 // If the request was canceled by the user do not show an error page. | 566 // If the request was canceled by the user do not show an error page. |
| 567 if (net_error == net::ERR_ABORTED) { | 567 if (net_error == net::ERR_ABORTED) { |
| 568 frame_tree_node_->ResetNavigationRequest(false); | 568 frame_tree_node_->ResetNavigationRequest(false); |
| 569 return; | 569 return; |
| 570 } | 570 } |
| 571 | 571 |
| 572 // Select an appropriate renderer to show the error page. | 572 // Select an appropriate renderer to show the error page. |
| 573 RenderFrameHostImpl* render_frame_host = | 573 RenderFrameHostImpl* render_frame_host = |
| 574 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); | 574 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); |
| 575 |
| 576 // Don't ask the renderer to commit an URL if the browser will kill it when |
| 577 // it does. |
| 578 DCHECK(render_frame_host->CanCommitURL(common_params_.url)); |
| 579 |
| 575 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, | 580 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, |
| 576 common_params_.url); | 581 common_params_.url); |
| 577 | 582 |
| 578 TransferNavigationHandleOwnership(render_frame_host); | 583 TransferNavigationHandleOwnership(render_frame_host); |
| 579 render_frame_host->navigation_handle()->ReadyToCommitNavigation( | 584 render_frame_host->navigation_handle()->ReadyToCommitNavigation( |
| 580 render_frame_host); | 585 render_frame_host); |
| 581 render_frame_host->FailedNavigation(common_params_, request_params_, | 586 render_frame_host->FailedNavigation(common_params_, request_params_, |
| 582 has_stale_copy_in_cache, net_error); | 587 has_stale_copy_in_cache, net_error); |
| 583 } | 588 } |
| 584 | 589 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 768 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
| 764 | 769 |
| 765 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 770 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
| 766 common_params_, request_params_, | 771 common_params_, request_params_, |
| 767 is_view_source_); | 772 is_view_source_); |
| 768 | 773 |
| 769 frame_tree_node_->ResetNavigationRequest(true); | 774 frame_tree_node_->ResetNavigationRequest(true); |
| 770 } | 775 } |
| 771 | 776 |
| 772 } // namespace content | 777 } // namespace content |
| OLD | NEW |