Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 893 const base::TimeTicks& navigation_start) { | 893 const base::TimeTicks& navigation_start) { |
| 894 frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, | 894 frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, |
| 895 navigation_start); | 895 navigation_start); |
| 896 } | 896 } |
| 897 | 897 |
| 898 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( | 898 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
| 899 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 899 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
| 900 if (!IsBrowserSideNavigationEnabled() && navigation_handle_) { | 900 if (!IsBrowserSideNavigationEnabled() && navigation_handle_) { |
| 901 navigation_handle_->set_net_error_code( | 901 navigation_handle_->set_net_error_code( |
| 902 static_cast<net::Error>(params.error_code)); | 902 static_cast<net::Error>(params.error_code)); |
| 903 } else { | |
| 904 // The renderer should not be sending this message unless asked to commit | |
| 905 // an error page. | |
| 906 // TODO(clamy): Stop sending DidFailProvisionalLoad IPCs at all when enough | |
| 907 // observers have moved to DidFinishNavigation. | |
| 908 if (!navigation_handle_ || | |
| 909 navigation_handle_->GetNetErrorCode() == net::OK) { | |
| 910 bad_message::ReceivedBadMessage( | |
| 911 GetProcess(), bad_message::RFH_UNEXPECTED_FAIL_PROVISIONAL_LOAD); | |
|
Charlie Reis
2016/04/11 21:10:57
The conditions surrounding this will make it hard
clamy
2016/04/12 14:08:01
Done. It was actually hard enough to read that I t
| |
| 912 return; | |
| 913 } | |
| 903 } | 914 } |
| 904 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); | 915 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); |
| 905 } | 916 } |
| 906 | 917 |
| 907 void RenderFrameHostImpl::OnDidFailLoadWithError( | 918 void RenderFrameHostImpl::OnDidFailLoadWithError( |
| 908 const GURL& url, | 919 const GURL& url, |
| 909 int error_code, | 920 int error_code, |
| 910 const base::string16& error_description, | 921 const base::string16& error_description, |
| 911 bool was_ignored_by_handler) { | 922 bool was_ignored_by_handler) { |
| 912 GURL validated_url(url); | 923 GURL validated_url(url); |
| (...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2741 } | 2752 } |
| 2742 | 2753 |
| 2743 void RenderFrameHostImpl::CreateWebBluetoothService( | 2754 void RenderFrameHostImpl::CreateWebBluetoothService( |
| 2744 blink::mojom::WebBluetoothServiceRequest request) { | 2755 blink::mojom::WebBluetoothServiceRequest request) { |
| 2745 DCHECK(!web_bluetooth_service_); | 2756 DCHECK(!web_bluetooth_service_); |
| 2746 web_bluetooth_service_.reset( | 2757 web_bluetooth_service_.reset( |
| 2747 new WebBluetoothServiceImpl(this, std::move(request))); | 2758 new WebBluetoothServiceImpl(this, std::move(request))); |
| 2748 } | 2759 } |
| 2749 | 2760 |
| 2750 } // namespace content | 2761 } // namespace content |
| OLD | NEW |