| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 bool is_ignoring_cache, | 183 bool is_ignoring_cache, |
| 184 std::string* error_html) { | 184 std::string* error_html) { |
| 185 core_->GetErrorHTML(GetFrameType(render_frame()), error, is_failed_post, | 185 core_->GetErrorHTML(GetFrameType(render_frame()), error, is_failed_post, |
| 186 is_ignoring_cache, error_html); | 186 is_ignoring_cache, error_html); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool NetErrorHelper::ShouldSuppressErrorPage(const GURL& url) { | 189 bool NetErrorHelper::ShouldSuppressErrorPage(const GURL& url) { |
| 190 return core_->ShouldSuppressErrorPage(GetFrameType(render_frame()), url); | 190 return core_->ShouldSuppressErrorPage(GetFrameType(render_frame()), url); |
| 191 } | 191 } |
| 192 | 192 |
| 193 mojom::NetworkDiagnostics* NetErrorHelper::GetRemoteNetworkDiagnostics() { | 193 chrome::mojom::NetworkDiagnostics* |
| 194 NetErrorHelper::GetRemoteNetworkDiagnostics() { |
| 194 if (!remote_network_diagnostics_) { | 195 if (!remote_network_diagnostics_) { |
| 195 render_frame()->GetRemoteAssociatedInterfaces() | 196 render_frame()->GetRemoteAssociatedInterfaces() |
| 196 ->GetInterface(&remote_network_diagnostics_); | 197 ->GetInterface(&remote_network_diagnostics_); |
| 197 } | 198 } |
| 198 return remote_network_diagnostics_.get(); | 199 return remote_network_diagnostics_.get(); |
| 199 } | 200 } |
| 200 | 201 |
| 201 void NetErrorHelper::GenerateLocalizedErrorPage( | 202 void NetErrorHelper::GenerateLocalizedErrorPage( |
| 202 const blink::WebURLError& error, | 203 const blink::WebURLError& error, |
| 203 bool is_failed_post, | 204 bool is_failed_post, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 base::i18n::IsRTL()); | 374 base::i18n::IsRTL()); |
| 374 } | 375 } |
| 375 | 376 |
| 376 void NetErrorHelper::OnTrackingRequestComplete( | 377 void NetErrorHelper::OnTrackingRequestComplete( |
| 377 const blink::WebURLResponse& response, | 378 const blink::WebURLResponse& response, |
| 378 const std::string& data) { | 379 const std::string& data) { |
| 379 tracking_fetcher_.reset(); | 380 tracking_fetcher_.reset(); |
| 380 } | 381 } |
| 381 | 382 |
| 382 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( | 383 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( |
| 383 mojom::NetworkDiagnosticsClientAssociatedRequest request) { | 384 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { |
| 384 DCHECK(!network_diagnostics_client_binding_.is_bound()); | 385 DCHECK(!network_diagnostics_client_binding_.is_bound()); |
| 385 network_diagnostics_client_binding_.Bind(std::move(request)); | 386 network_diagnostics_client_binding_.Bind(std::move(request)); |
| 386 } | 387 } |
| 387 | 388 |
| 388 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { | 389 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { |
| 389 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); | 390 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); |
| 390 } | 391 } |
| 391 | 392 |
| 392 #if defined(OS_ANDROID) | 393 #if defined(OS_ANDROID) |
| 393 void NetErrorHelper::OnSetHasOfflinePages(bool has_offline_pages) { | 394 void NetErrorHelper::OnSetHasOfflinePages(bool has_offline_pages) { |
| 394 core_->OnSetHasOfflinePages(has_offline_pages); | 395 core_->OnSetHasOfflinePages(has_offline_pages); |
| 395 } | 396 } |
| 396 #endif // defined(OS_ANDROID) | 397 #endif // defined(OS_ANDROID) |
| OLD | NEW |