Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: chrome/renderer/net/net_error_helper.cc

Issue 2649773006: Use explicit WebString conversions in renderer/net/net_error_helper.cc (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
313 } 313 }
314 314
315 void NetErrorHelper::ReloadPage(bool bypass_cache) { 315 void NetErrorHelper::ReloadPage(bool bypass_cache) {
316 render_frame()->GetWebFrame()->reload( 316 render_frame()->GetWebFrame()->reload(
317 bypass_cache ? blink::WebFrameLoadType::ReloadBypassingCache 317 bypass_cache ? blink::WebFrameLoadType::ReloadBypassingCache
318 : blink::WebFrameLoadType::ReloadMainResource); 318 : blink::WebFrameLoadType::ReloadMainResource);
319 } 319 }
320 320
321 void NetErrorHelper::LoadPageFromCache(const GURL& page_url) { 321 void NetErrorHelper::LoadPageFromCache(const GURL& page_url) {
322 blink::WebFrame* web_frame = render_frame()->GetWebFrame(); 322 blink::WebFrame* web_frame = render_frame()->GetWebFrame();
323 DCHECK(!base::EqualsASCII( 323 DCHECK_NE("POST", web_frame->dataSource()->getRequest().httpMethod().ascii());
324 base::StringPiece16(web_frame->dataSource()->getRequest().httpMethod()),
325 "POST"));
326 324
327 blink::WebURLRequest request(page_url); 325 blink::WebURLRequest request(page_url);
328 request.setCachePolicy(blink::WebCachePolicy::ReturnCacheDataDontLoad); 326 request.setCachePolicy(blink::WebCachePolicy::ReturnCacheDataDontLoad);
329 web_frame->loadRequest(request); 327 web_frame->loadRequest(request);
330 } 328 }
331 329
332 void NetErrorHelper::DiagnoseError(const GURL& page_url) { 330 void NetErrorHelper::DiagnoseError(const GURL& page_url) {
333 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url); 331 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url);
334 } 332 }
335 333
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 384
387 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( 385 void NetErrorHelper::OnNetworkDiagnosticsClientRequest(
388 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { 386 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) {
389 DCHECK(!network_diagnostics_client_binding_.is_bound()); 387 DCHECK(!network_diagnostics_client_binding_.is_bound());
390 network_diagnostics_client_binding_.Bind(std::move(request)); 388 network_diagnostics_client_binding_.Bind(std::move(request));
391 } 389 }
392 390
393 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { 391 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) {
394 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); 392 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show);
395 } 393 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698