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