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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 accessibility_reset_token_(0), | 293 accessibility_reset_token_(0), |
294 accessibility_reset_count_(0), | 294 accessibility_reset_count_(0), |
295 browser_plugin_embedder_ax_tree_id_(AXTreeIDRegistry::kNoAXTreeID), | 295 browser_plugin_embedder_ax_tree_id_(AXTreeIDRegistry::kNoAXTreeID), |
296 no_create_browser_accessibility_manager_for_testing_(false), | 296 no_create_browser_accessibility_manager_for_testing_(false), |
297 web_ui_type_(WebUI::kNoWebUI), | 297 web_ui_type_(WebUI::kNoWebUI), |
298 pending_web_ui_type_(WebUI::kNoWebUI), | 298 pending_web_ui_type_(WebUI::kNoWebUI), |
299 should_reuse_web_ui_(false), | 299 should_reuse_web_ui_(false), |
300 last_navigation_lofi_state_(LOFI_UNSPECIFIED), | 300 last_navigation_lofi_state_(LOFI_UNSPECIFIED), |
301 frame_host_binding_(this), | 301 frame_host_binding_(this), |
302 weak_ptr_factory_(this) { | 302 weak_ptr_factory_(this) { |
| 303 LOG(ERROR) << "RFH[" << this << "]::RFH: " |
| 304 << " routing_id:" << routing_id |
| 305 << " instance:" << site_instance->GetId() << ":" |
| 306 << site_instance->GetSiteURL(); |
303 frame_tree_->AddRenderViewHostRef(render_view_host_); | 307 frame_tree_->AddRenderViewHostRef(render_view_host_); |
304 GetProcess()->AddRoute(routing_id_, this); | 308 GetProcess()->AddRoute(routing_id_, this); |
305 g_routing_id_frame_map.Get().insert(std::make_pair( | 309 g_routing_id_frame_map.Get().insert(std::make_pair( |
306 RenderFrameHostID(GetProcess()->GetID(), routing_id_), | 310 RenderFrameHostID(GetProcess()->GetID(), routing_id_), |
307 this)); | 311 this)); |
308 site_instance_->AddObserver(this); | 312 site_instance_->AddObserver(this); |
309 GetSiteInstance()->IncrementActiveFrameCount(); | 313 GetSiteInstance()->IncrementActiveFrameCount(); |
310 | 314 |
311 if (frame_tree_node_->parent()) { | 315 if (frame_tree_node_->parent()) { |
312 // Keep track of the parent RenderFrameHost, which shouldn't change even if | 316 // Keep track of the parent RenderFrameHost, which shouldn't change even if |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 391 |
388 if (render_widget_host_ && | 392 if (render_widget_host_ && |
389 render_widget_host_->owned_by_render_frame_host()) { | 393 render_widget_host_->owned_by_render_frame_host()) { |
390 // Shutdown causes the RenderWidgetHost to delete itself. | 394 // Shutdown causes the RenderWidgetHost to delete itself. |
391 render_widget_host_->ShutdownAndDestroyWidget(true); | 395 render_widget_host_->ShutdownAndDestroyWidget(true); |
392 } | 396 } |
393 | 397 |
394 // Notify the FrameTree that this RFH is going away, allowing it to shut down | 398 // Notify the FrameTree that this RFH is going away, allowing it to shut down |
395 // the corresponding RenderViewHost if it is no longer needed. | 399 // the corresponding RenderViewHost if it is no longer needed. |
396 frame_tree_->ReleaseRenderViewHostRef(render_view_host_); | 400 frame_tree_->ReleaseRenderViewHostRef(render_view_host_); |
| 401 |
| 402 LOG(ERROR) << "RFH[" << this << "]::~RFH"; |
397 } | 403 } |
398 | 404 |
399 int RenderFrameHostImpl::GetRoutingID() { | 405 int RenderFrameHostImpl::GetRoutingID() { |
400 return routing_id_; | 406 return routing_id_; |
401 } | 407 } |
402 | 408 |
403 AXTreeIDRegistry::AXTreeID RenderFrameHostImpl::GetAXTreeID() { | 409 AXTreeIDRegistry::AXTreeID RenderFrameHostImpl::GetAXTreeID() { |
404 return AXTreeIDRegistry::GetInstance()->GetOrCreateAXTreeID( | 410 return AXTreeIDRegistry::GetInstance()->GetOrCreateAXTreeID( |
405 GetProcess()->GetID(), routing_id_); | 411 GetProcess()->GetID(), routing_id_); |
406 } | 412 } |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 base::TimeDelta::FromMinutes(10), 100); | 1082 base::TimeDelta::FromMinutes(10), 100); |
1077 } | 1083 } |
1078 // This message is only sent for top-level frames. TODO(avi): when frame tree | 1084 // This message is only sent for top-level frames. TODO(avi): when frame tree |
1079 // mirroring works correctly, add a check here to enforce it. | 1085 // mirroring works correctly, add a check here to enforce it. |
1080 delegate_->DocumentOnLoadCompleted(this); | 1086 delegate_->DocumentOnLoadCompleted(this); |
1081 } | 1087 } |
1082 | 1088 |
1083 void RenderFrameHostImpl::OnDidStartProvisionalLoad( | 1089 void RenderFrameHostImpl::OnDidStartProvisionalLoad( |
1084 const GURL& url, | 1090 const GURL& url, |
1085 const base::TimeTicks& navigation_start) { | 1091 const base::TimeTicks& navigation_start) { |
| 1092 LOG(ERROR) << "RFH[" << this << "]::DidStartProvisionalLoad: " |
| 1093 << " url:" << url.spec().substr(0, 250); |
1086 // TODO(clamy): Check if other navigation methods (OpenURL, | 1094 // TODO(clamy): Check if other navigation methods (OpenURL, |
1087 // DidFailProvisionalLoad, ...) should also be ignored if the RFH is no longer | 1095 // DidFailProvisionalLoad, ...) should also be ignored if the RFH is no longer |
1088 // active. | 1096 // active. |
1089 if (!is_active()) | 1097 if (!is_active()) |
1090 return; | 1098 return; |
| 1099 |
1091 frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, | 1100 frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, |
1092 navigation_start); | 1101 navigation_start); |
1093 } | 1102 } |
1094 | 1103 |
1095 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( | 1104 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
1096 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 1105 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
| 1106 LOG(ERROR) << "RFH[" << this << "]::DidFailProvisionalLoadWithError: " |
| 1107 << " error:" << params.error_code; |
| 1108 |
1097 // TODO(clamy): Kill the renderer with RFH_FAIL_PROVISIONAL_LOAD_NO_HANDLE and | 1109 // TODO(clamy): Kill the renderer with RFH_FAIL_PROVISIONAL_LOAD_NO_HANDLE and |
1098 // return early if navigation_handle_ is null, once we prevent that case from | 1110 // return early if navigation_handle_ is null, once we prevent that case from |
1099 // happening in practice. | 1111 // happening in practice. |
1100 | 1112 |
1101 // Update the error code in the NavigationHandle of the navigation. | 1113 // Update the error code in the NavigationHandle of the navigation. |
1102 if (navigation_handle_) { | 1114 if (navigation_handle_) { |
1103 navigation_handle_->set_net_error_code( | 1115 navigation_handle_->set_net_error_code( |
1104 static_cast<net::Error>(params.error_code)); | 1116 static_cast<net::Error>(params.error_code)); |
1105 } | 1117 } |
1106 | 1118 |
1107 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); | 1119 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); |
1108 } | 1120 } |
1109 | 1121 |
1110 void RenderFrameHostImpl::OnDidFailLoadWithError( | 1122 void RenderFrameHostImpl::OnDidFailLoadWithError( |
1111 const GURL& url, | 1123 const GURL& url, |
1112 int error_code, | 1124 int error_code, |
1113 const base::string16& error_description, | 1125 const base::string16& error_description, |
1114 bool was_ignored_by_handler) { | 1126 bool was_ignored_by_handler) { |
1115 GURL validated_url(url); | 1127 GURL validated_url(url); |
| 1128 LOG(ERROR) << "RFH[" << this << "]::DidFailLoadWithError: " |
| 1129 << " url:" << url.spec().substr(0, 250) << " error:" << error_code; |
| 1130 |
1116 GetProcess()->FilterURL(false, &validated_url); | 1131 GetProcess()->FilterURL(false, &validated_url); |
1117 | 1132 |
1118 frame_tree_node_->navigator()->DidFailLoadWithError( | 1133 frame_tree_node_->navigator()->DidFailLoadWithError( |
1119 this, validated_url, error_code, error_description, | 1134 this, validated_url, error_code, error_description, |
1120 was_ignored_by_handler); | 1135 was_ignored_by_handler); |
1121 } | 1136 } |
1122 | 1137 |
1123 // Called when the renderer navigates. For every frame loaded, we'll get this | 1138 // Called when the renderer navigates. For every frame loaded, we'll get this |
1124 // notification containing parameters identifying the navigation. | 1139 // notification containing parameters identifying the navigation. |
1125 void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { | 1140 void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
1126 ScopedCommitStateResetter commit_state_resetter(this); | 1141 ScopedCommitStateResetter commit_state_resetter(this); |
1127 RenderProcessHost* process = GetProcess(); | 1142 RenderProcessHost* process = GetProcess(); |
1128 | 1143 |
1129 // Read the parameters out of the IPC message directly to avoid making another | 1144 // Read the parameters out of the IPC message directly to avoid making another |
1130 // copy when we filter the URLs. | 1145 // copy when we filter the URLs. |
1131 base::PickleIterator iter(msg); | 1146 base::PickleIterator iter(msg); |
1132 FrameHostMsg_DidCommitProvisionalLoad_Params validated_params; | 1147 FrameHostMsg_DidCommitProvisionalLoad_Params validated_params; |
1133 if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>:: | 1148 if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>:: |
1134 Read(&msg, &iter, &validated_params)) { | 1149 Read(&msg, &iter, &validated_params)) { |
1135 bad_message::ReceivedBadMessage( | 1150 bad_message::ReceivedBadMessage( |
1136 process, bad_message::RFH_COMMIT_DESERIALIZATION_FAILED); | 1151 process, bad_message::RFH_COMMIT_DESERIALIZATION_FAILED); |
| 1152 LOG(ERROR) << "RFH[" << this << "]::DidCommitProvisionalLoad: " |
| 1153 << " failed to read IPC, killed renderer"; |
1137 return; | 1154 return; |
1138 } | 1155 } |
1139 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnDidCommitProvisionalLoad", | 1156 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnDidCommitProvisionalLoad", |
1140 "url", validated_params.url.possibly_invalid_spec()); | 1157 "url", validated_params.url.possibly_invalid_spec()); |
1141 | 1158 |
| 1159 LOG(ERROR) << "RFH[" << this << "]::DidCommitProvisionalLoad: " |
| 1160 << " url:" << validated_params.url.spec().substr(0, 250); |
| 1161 |
1142 // Sanity-check the page transition for frame type. | 1162 // Sanity-check the page transition for frame type. |
1143 DCHECK_EQ(ui::PageTransitionIsMainFrame(validated_params.transition), | 1163 DCHECK_EQ(ui::PageTransitionIsMainFrame(validated_params.transition), |
1144 !GetParent()); | 1164 !GetParent()); |
1145 | 1165 |
1146 // If we're waiting for a cross-site beforeunload ack from this renderer and | 1166 // If we're waiting for a cross-site beforeunload ack from this renderer and |
1147 // we receive a Navigate message from the main frame, then the renderer was | 1167 // we receive a Navigate message from the main frame, then the renderer was |
1148 // navigating already and sent it before hearing the FrameMsg_Stop message. | 1168 // navigating already and sent it before hearing the FrameMsg_Stop message. |
1149 // Treat this as an implicit beforeunload ack to allow the pending navigation | 1169 // Treat this as an implicit beforeunload ack to allow the pending navigation |
1150 // to continue. | 1170 // to continue. |
1151 if (is_waiting_for_beforeunload_ack_ && | 1171 if (is_waiting_for_beforeunload_ack_ && |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 } | 1380 } |
1361 | 1381 |
1362 void RenderFrameHostImpl::SwapOut( | 1382 void RenderFrameHostImpl::SwapOut( |
1363 RenderFrameProxyHost* proxy, | 1383 RenderFrameProxyHost* proxy, |
1364 bool is_loading) { | 1384 bool is_loading) { |
1365 // The end of this event is in OnSwapOutACK when the RenderFrame has completed | 1385 // The end of this event is in OnSwapOutACK when the RenderFrame has completed |
1366 // the operation and sends back an IPC message. | 1386 // the operation and sends back an IPC message. |
1367 // The trace event may not end properly if the ACK times out. We expect this | 1387 // The trace event may not end properly if the ACK times out. We expect this |
1368 // to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost. | 1388 // to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost. |
1369 TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this); | 1389 TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this); |
| 1390 LOG(ERROR) << "RFH[" << this << "]::SwapOut"; |
1370 | 1391 |
1371 // If this RenderFrameHost is already pending deletion, it must have already | 1392 // If this RenderFrameHost is already pending deletion, it must have already |
1372 // gone through this, therefore just return. | 1393 // gone through this, therefore just return. |
1373 if (!is_active()) { | 1394 if (!is_active()) { |
1374 NOTREACHED() << "RFH should be in default state when calling SwapOut."; | 1395 NOTREACHED() << "RFH should be in default state when calling SwapOut."; |
1375 return; | 1396 return; |
1376 } | 1397 } |
1377 | 1398 |
1378 if (swapout_event_monitor_timeout_) { | 1399 if (swapout_event_monitor_timeout_) { |
1379 swapout_event_monitor_timeout_->Start(base::TimeDelta::FromMilliseconds( | 1400 swapout_event_monitor_timeout_->Start(base::TimeDelta::FromMilliseconds( |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 if (!proceed) | 1520 if (!proceed) |
1500 render_view_host_->GetDelegate()->DidCancelLoading(); | 1521 render_view_host_->GetDelegate()->DidCancelLoading(); |
1501 } | 1522 } |
1502 | 1523 |
1503 bool RenderFrameHostImpl::IsWaitingForUnloadACK() const { | 1524 bool RenderFrameHostImpl::IsWaitingForUnloadACK() const { |
1504 return render_view_host_->is_waiting_for_close_ack_ || | 1525 return render_view_host_->is_waiting_for_close_ack_ || |
1505 is_waiting_for_swapout_ack_; | 1526 is_waiting_for_swapout_ack_; |
1506 } | 1527 } |
1507 | 1528 |
1508 void RenderFrameHostImpl::OnSwapOutACK() { | 1529 void RenderFrameHostImpl::OnSwapOutACK() { |
| 1530 LOG(ERROR) << "RFH[" << this << "]::SwapOutACK"; |
1509 OnSwappedOut(); | 1531 OnSwappedOut(); |
1510 } | 1532 } |
1511 | 1533 |
1512 void RenderFrameHostImpl::OnRenderProcessGone(int status, int exit_code) { | 1534 void RenderFrameHostImpl::OnRenderProcessGone(int status, int exit_code) { |
1513 if (frame_tree_node_->IsMainFrame()) { | 1535 if (frame_tree_node_->IsMainFrame()) { |
1514 // Keep the termination status so we can get at it later when we | 1536 // Keep the termination status so we can get at it later when we |
1515 // need to know why it died. | 1537 // need to know why it died. |
1516 render_view_host_->render_view_termination_status_ = | 1538 render_view_host_->render_view_termination_status_ = |
1517 static_cast<base::TerminationStatus>(status); | 1539 static_cast<base::TerminationStatus>(status); |
1518 } | 1540 } |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 return CanCommitURL(origin_url); | 2364 return CanCommitURL(origin_url); |
2343 } | 2365 } |
2344 | 2366 |
2345 void RenderFrameHostImpl::Navigate( | 2367 void RenderFrameHostImpl::Navigate( |
2346 const CommonNavigationParams& common_params, | 2368 const CommonNavigationParams& common_params, |
2347 const StartNavigationParams& start_params, | 2369 const StartNavigationParams& start_params, |
2348 const RequestNavigationParams& request_params) { | 2370 const RequestNavigationParams& request_params) { |
2349 TRACE_EVENT0("navigation", "RenderFrameHostImpl::Navigate"); | 2371 TRACE_EVENT0("navigation", "RenderFrameHostImpl::Navigate"); |
2350 DCHECK(!IsBrowserSideNavigationEnabled()); | 2372 DCHECK(!IsBrowserSideNavigationEnabled()); |
2351 | 2373 |
| 2374 LOG(ERROR) << "RFH[" << this << "]::Navigate: " |
| 2375 << " url:" << common_params.url.spec().substr(0, 250); |
| 2376 |
2352 UpdatePermissionsForNavigation(common_params, request_params); | 2377 UpdatePermissionsForNavigation(common_params, request_params); |
2353 | 2378 |
2354 // Only send the message if we aren't suspended at the start of a cross-site | 2379 // Only send the message if we aren't suspended at the start of a cross-site |
2355 // request. | 2380 // request. |
2356 if (navigations_suspended_) { | 2381 if (navigations_suspended_) { |
2357 // This may replace an existing set of params, if this is a pending RFH that | 2382 // This may replace an existing set of params, if this is a pending RFH that |
2358 // is navigated twice consecutively. | 2383 // is navigated twice consecutively. |
2359 suspended_nav_params_.reset( | 2384 suspended_nav_params_.reset( |
2360 new NavigationParams(common_params, start_params, request_params)); | 2385 new NavigationParams(common_params, start_params, request_params)); |
2361 } else { | 2386 } else { |
(...skipping 29 matching lines...) Expand all Loading... |
2391 CommitNavigation(nullptr, nullptr, common_params, RequestNavigationParams(), | 2416 CommitNavigation(nullptr, nullptr, common_params, RequestNavigationParams(), |
2392 false); | 2417 false); |
2393 } else { | 2418 } else { |
2394 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); | 2419 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); |
2395 } | 2420 } |
2396 } | 2421 } |
2397 | 2422 |
2398 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, | 2423 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, |
2399 SiteInstance* source_site_instance) { | 2424 SiteInstance* source_site_instance) { |
2400 GURL validated_url(params.url); | 2425 GURL validated_url(params.url); |
| 2426 |
| 2427 LOG(ERROR) << "RFH[" << this << "]::OpenURL: " |
| 2428 << " url:" << validated_url.spec().substr(0, 250); |
2401 GetProcess()->FilterURL(false, &validated_url); | 2429 GetProcess()->FilterURL(false, &validated_url); |
2402 | 2430 |
2403 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", | 2431 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
2404 validated_url.possibly_invalid_spec()); | 2432 validated_url.possibly_invalid_spec()); |
2405 frame_tree_node_->navigator()->RequestOpenURL( | 2433 frame_tree_node_->navigator()->RequestOpenURL( |
2406 this, validated_url, params.uses_post, params.resource_request_body, | 2434 this, validated_url, params.uses_post, params.resource_request_body, |
2407 source_site_instance, params.referrer, params.disposition, | 2435 source_site_instance, params.referrer, params.disposition, |
2408 params.should_replace_current_entry, params.user_gesture); | 2436 params.should_replace_current_entry, params.user_gesture); |
2409 } | 2437 } |
2410 | 2438 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2555 } | 2583 } |
2556 } | 2584 } |
2557 | 2585 |
2558 // PlzNavigate | 2586 // PlzNavigate |
2559 void RenderFrameHostImpl::CommitNavigation( | 2587 void RenderFrameHostImpl::CommitNavigation( |
2560 ResourceResponse* response, | 2588 ResourceResponse* response, |
2561 std::unique_ptr<StreamHandle> body, | 2589 std::unique_ptr<StreamHandle> body, |
2562 const CommonNavigationParams& common_params, | 2590 const CommonNavigationParams& common_params, |
2563 const RequestNavigationParams& request_params, | 2591 const RequestNavigationParams& request_params, |
2564 bool is_view_source) { | 2592 bool is_view_source) { |
| 2593 LOG(ERROR) << "RFH[" << this << "]::CommitNavigation: " |
| 2594 << " url:" << common_params.url.spec().substr(0, 250); |
| 2595 |
2565 DCHECK((response && body.get()) || | 2596 DCHECK((response && body.get()) || |
2566 common_params.url.SchemeIs(url::kDataScheme) || | 2597 common_params.url.SchemeIs(url::kDataScheme) || |
2567 !ShouldMakeNetworkRequestForURL(common_params.url) || | 2598 !ShouldMakeNetworkRequestForURL(common_params.url) || |
2568 IsRendererDebugURL(common_params.url)); | 2599 IsRendererDebugURL(common_params.url)); |
2569 UpdatePermissionsForNavigation(common_params, request_params); | 2600 UpdatePermissionsForNavigation(common_params, request_params); |
2570 | 2601 |
2571 // Get back to a clean state, in case we start a new navigation without | 2602 // Get back to a clean state, in case we start a new navigation without |
2572 // completing an unload handler. | 2603 // completing an unload handler. |
2573 ResetWaitingState(); | 2604 ResetWaitingState(); |
2574 | 2605 |
(...skipping 27 matching lines...) Expand all Loading... |
2602 pending_commit_ = true; | 2633 pending_commit_ = true; |
2603 is_loading_ = true; | 2634 is_loading_ = true; |
2604 } | 2635 } |
2605 } | 2636 } |
2606 | 2637 |
2607 void RenderFrameHostImpl::FailedNavigation( | 2638 void RenderFrameHostImpl::FailedNavigation( |
2608 const CommonNavigationParams& common_params, | 2639 const CommonNavigationParams& common_params, |
2609 const RequestNavigationParams& request_params, | 2640 const RequestNavigationParams& request_params, |
2610 bool has_stale_copy_in_cache, | 2641 bool has_stale_copy_in_cache, |
2611 int error_code) { | 2642 int error_code) { |
| 2643 LOG(ERROR) << "RFH[" << this << "]::FailedNavigation: " |
| 2644 << " url:" << common_params.url.spec().substr(0, 250); |
| 2645 |
2612 // Update renderer permissions even for failed commits, so that for example | 2646 // Update renderer permissions even for failed commits, so that for example |
2613 // the URL bar correctly displays privileged URLs instead of filtering them. | 2647 // the URL bar correctly displays privileged URLs instead of filtering them. |
2614 UpdatePermissionsForNavigation(common_params, request_params); | 2648 UpdatePermissionsForNavigation(common_params, request_params); |
2615 | 2649 |
2616 // Get back to a clean state, in case a new navigation started without | 2650 // Get back to a clean state, in case a new navigation started without |
2617 // completing an unload handler. | 2651 // completing an unload handler. |
2618 ResetWaitingState(); | 2652 ResetWaitingState(); |
2619 | 2653 |
2620 Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params, | 2654 Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params, |
2621 has_stale_copy_in_cache, error_code)); | 2655 has_stale_copy_in_cache, error_code)); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3187 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3221 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3188 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3222 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3189 return web_bluetooth_service_.get(); | 3223 return web_bluetooth_service_.get(); |
3190 } | 3224 } |
3191 | 3225 |
3192 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3226 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3193 web_bluetooth_service_.reset(); | 3227 web_bluetooth_service_.reset(); |
3194 } | 3228 } |
3195 | 3229 |
3196 } // namespace content | 3230 } // namespace content |
OLD | NEW |