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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 base::Unretained(this))); | 313 base::Unretained(this))); |
314 } | 314 } |
315 | 315 |
316 void NetErrorHelper::ReloadPage(bool bypass_cache) { | 316 void NetErrorHelper::ReloadPage(bool bypass_cache) { |
317 render_frame()->GetWebFrame()->Reload( | 317 render_frame()->GetWebFrame()->Reload( |
318 bypass_cache ? blink::WebFrameLoadType::kReloadBypassingCache | 318 bypass_cache ? blink::WebFrameLoadType::kReloadBypassingCache |
319 : blink::WebFrameLoadType::kReload); | 319 : blink::WebFrameLoadType::kReload); |
320 } | 320 } |
321 | 321 |
322 void NetErrorHelper::LoadPageFromCache(const GURL& page_url) { | 322 void NetErrorHelper::LoadPageFromCache(const GURL& page_url) { |
323 blink::WebFrame* web_frame = render_frame()->GetWebFrame(); | 323 blink::WebLocalFrame* web_frame = render_frame()->GetWebFrame(); |
324 DCHECK_NE("POST", web_frame->DataSource()->GetRequest().HttpMethod().Ascii()); | 324 DCHECK_NE("POST", web_frame->DataSource()->GetRequest().HttpMethod().Ascii()); |
325 | 325 |
326 blink::WebURLRequest request(page_url); | 326 blink::WebURLRequest request(page_url); |
327 request.SetCachePolicy(blink::WebCachePolicy::kReturnCacheDataDontLoad); | 327 request.SetCachePolicy(blink::WebCachePolicy::kReturnCacheDataDontLoad); |
328 web_frame->LoadRequest(request); | 328 web_frame->LoadRequest(request); |
329 } | 329 } |
330 | 330 |
331 void NetErrorHelper::DiagnoseError(const GURL& page_url) { | 331 void NetErrorHelper::DiagnoseError(const GURL& page_url) { |
332 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url); | 332 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url); |
333 } | 333 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( | 386 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( |
387 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { | 387 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { |
388 DCHECK(!network_diagnostics_client_binding_.is_bound()); | 388 DCHECK(!network_diagnostics_client_binding_.is_bound()); |
389 network_diagnostics_client_binding_.Bind(std::move(request)); | 389 network_diagnostics_client_binding_.Bind(std::move(request)); |
390 } | 390 } |
391 | 391 |
392 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { | 392 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { |
393 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); | 393 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); |
394 } | 394 } |
OLD | NEW |