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

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

Issue 2538423002: Reload Reloaded: Use ReloadMainResource even on recovering from offline (Closed)
Patch Set: Created 4 years 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 | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 render_frame()->GetWebFrame(), 308 render_frame()->GetWebFrame(),
309 blink::WebURLRequest::RequestContextInternal, 309 blink::WebURLRequest::RequestContextInternal,
310 blink::WebURLRequest::FrameTypeNone, 310 blink::WebURLRequest::FrameTypeNone,
311 base::Bind(&NetErrorHelper::OnTrackingRequestComplete, 311 base::Bind(&NetErrorHelper::OnTrackingRequestComplete,
312 base::Unretained(this))); 312 base::Unretained(this)));
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::Reload); 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(!base::EqualsASCII(
324 base::StringPiece16(web_frame->dataSource()->request().httpMethod()), 324 base::StringPiece16(web_frame->dataSource()->request().httpMethod()),
325 "POST")); 325 "POST"));
326 326
327 blink::WebURLRequest request(page_url); 327 blink::WebURLRequest request(page_url);
328 request.setCachePolicy(blink::WebCachePolicy::ReturnCacheDataDontLoad); 328 request.setCachePolicy(blink::WebCachePolicy::ReturnCacheDataDontLoad);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( 379 void NetErrorHelper::OnNetworkDiagnosticsClientRequest(
380 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { 380 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) {
381 DCHECK(!network_diagnostics_client_binding_.is_bound()); 381 DCHECK(!network_diagnostics_client_binding_.is_bound());
382 network_diagnostics_client_binding_.Bind(std::move(request)); 382 network_diagnostics_client_binding_.Bind(std::move(request));
383 } 383 }
384 384
385 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { 385 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) {
386 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); 386 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show);
387 } 387 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698