| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/renderer/net/net_error_helper.h" | 5 #include "chrome/renderer/net/net_error_helper.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void NetErrorHelper::TrackClick(int tracking_id) { | 117 void NetErrorHelper::TrackClick(int tracking_id) { |
| 118 core_->TrackClick(tracking_id); | 118 core_->TrackClick(tracking_id); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void NetErrorHelper::DidStartProvisionalLoad( | 121 void NetErrorHelper::DidStartProvisionalLoad( |
| 122 blink::WebDataSource* data_source) { | 122 blink::WebDataSource* data_source) { |
| 123 core_->OnStartLoad(GetFrameType(render_frame()), | 123 core_->OnStartLoad(GetFrameType(render_frame()), |
| 124 GetLoadingPageType(data_source)); | 124 GetLoadingPageType(data_source)); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void NetErrorHelper::DidCommitProvisionalLoad(bool is_new_navigation, | 127 void NetErrorHelper::DidCommitProvisionalLoad( |
| 128 bool is_same_page_navigation) { | 128 bool is_new_navigation, |
| 129 // If this is a "same page" navigation, it's not a real navigation. There | 129 bool is_same_document_navigation) { |
| 130 // If this is a "same-document" navigation, it's not a real navigation. There |
| 130 // wasn't a start event for it, either, so just ignore it. | 131 // wasn't a start event for it, either, so just ignore it. |
| 131 if (is_same_page_navigation) | 132 if (is_same_document_navigation) |
| 132 return; | 133 return; |
| 133 | 134 |
| 134 // Invalidate weak pointers from old error page controllers. If loading a new | 135 // Invalidate weak pointers from old error page controllers. If loading a new |
| 135 // error page, the controller has not yet been attached, so this won't affect | 136 // error page, the controller has not yet been attached, so this won't affect |
| 136 // it. | 137 // it. |
| 137 weak_controller_delegate_factory_.InvalidateWeakPtrs(); | 138 weak_controller_delegate_factory_.InvalidateWeakPtrs(); |
| 138 | 139 |
| 139 core_->OnCommitLoad(GetFrameType(render_frame()), | 140 core_->OnCommitLoad(GetFrameType(render_frame()), |
| 140 render_frame()->GetWebFrame()->document().url()); | 141 render_frame()->GetWebFrame()->document().url()); |
| 141 } | 142 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 384 |
| 384 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( | 385 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( |
| 385 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { | 386 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { |
| 386 DCHECK(!network_diagnostics_client_binding_.is_bound()); | 387 DCHECK(!network_diagnostics_client_binding_.is_bound()); |
| 387 network_diagnostics_client_binding_.Bind(std::move(request)); | 388 network_diagnostics_client_binding_.Bind(std::move(request)); |
| 388 } | 389 } |
| 389 | 390 |
| 390 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { | 391 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { |
| 391 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); | 392 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); |
| 392 } | 393 } |
| OLD | NEW |