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/debug/dump_without_crashing.h" |
9 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
10 #include "content/browser/appcache/appcache_navigation_handle.h" | 11 #include "content/browser/appcache/appcache_navigation_handle.h" |
11 #include "content/browser/appcache/chrome_appcache_service.h" | 12 #include "content/browser/appcache/chrome_appcache_service.h" |
12 #include "content/browser/child_process_security_policy_impl.h" | 13 #include "content/browser/child_process_security_policy_impl.h" |
13 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 14 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
14 #include "content/browser/frame_host/debug_urls.h" | 15 #include "content/browser/frame_host/debug_urls.h" |
15 #include "content/browser/frame_host/frame_tree.h" | 16 #include "content/browser/frame_host/frame_tree.h" |
16 #include "content/browser/frame_host/frame_tree_node.h" | 17 #include "content/browser/frame_host/frame_tree_node.h" |
17 #include "content/browser/frame_host/navigation_controller_impl.h" | 18 #include "content/browser/frame_host/navigation_controller_impl.h" |
18 #include "content/browser/frame_host/navigation_handle_impl.h" | 19 #include "content/browser/frame_host/navigation_handle_impl.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 // WebUI backend won't find a handler for them. They will be processed in the | 604 // WebUI backend won't find a handler for them. They will be processed in the |
604 // renderer, however do not discard the pending entry so that the URL bar | 605 // renderer, however do not discard the pending entry so that the URL bar |
605 // shows them correctly. | 606 // shows them correctly. |
606 if (!IsRendererDebugURL(common_params_.url)) { | 607 if (!IsRendererDebugURL(common_params_.url)) { |
607 frame_tree_node_->navigator()->DiscardPendingEntryIfNeeded( | 608 frame_tree_node_->navigator()->DiscardPendingEntryIfNeeded( |
608 navigation_handle_.get()); | 609 navigation_handle_.get()); |
609 } | 610 } |
610 | 611 |
611 // If the request was canceled by the user do not show an error page. | 612 // If the request was canceled by the user do not show an error page. |
612 if (net_error == net::ERR_ABORTED) { | 613 if (net_error == net::ERR_ABORTED) { |
| 614 // TODO(clamy): Remove this once we understand the root cause of |
| 615 // crbug.com/709771. |
| 616 std::string path = common_params_.url.path(); |
| 617 if (path.length() >= 4 && path.substr(path.length() - 4) == ".pdf") |
| 618 base::debug::DumpWithoutCrashing(); |
| 619 |
613 frame_tree_node_->ResetNavigationRequest(false, true); | 620 frame_tree_node_->ResetNavigationRequest(false, true); |
614 return; | 621 return; |
615 } | 622 } |
616 | 623 |
617 // There are two types of error pages that need to be handled differently. | 624 // There are two types of error pages that need to be handled differently. |
618 // * Error pages resulting from blocking the request, because the original | 625 // * Error pages resulting from blocking the request, because the original |
619 // document wasn't even allowed to make the request. In such case, | 626 // document wasn't even allowed to make the request. In such case, |
620 // the error pages should be committed in the process of the original | 627 // the error pages should be committed in the process of the original |
621 // document, to avoid creating a process for the destination. | 628 // document, to avoid creating a process for the destination. |
622 // * Error pages resulting from either network outage (no network, DNS | 629 // * Error pages resulting from either network outage (no network, DNS |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 849 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
843 | 850 |
844 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 851 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
845 std::move(handle_), common_params_, | 852 std::move(handle_), common_params_, |
846 request_params_, is_view_source_); | 853 request_params_, is_view_source_); |
847 | 854 |
848 frame_tree_node_->ResetNavigationRequest(true, true); | 855 frame_tree_node_->ResetNavigationRequest(true, true); |
849 } | 856 } |
850 | 857 |
851 } // namespace content | 858 } // namespace content |
OLD | NEW |