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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2852433004: Add an experimental flag to change location.reload to take a hard-reload (Closed)
Patch Set: Merge branch 'master' into 2852433004 Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 DCHECK(IsReloadLoadType(load_type)); 394 DCHECK(IsReloadLoadType(load_type));
395 if (client_redirect_policy == ClientRedirectPolicy::kNotClientRedirect) { 395 if (client_redirect_policy == ClientRedirectPolicy::kNotClientRedirect) {
396 if (!loader_.GetDocumentLoader()->GetHistoryItem()) 396 if (!loader_.GetDocumentLoader()->GetHistoryItem())
397 return; 397 return;
398 FrameLoadRequest request = FrameLoadRequest( 398 FrameLoadRequest request = FrameLoadRequest(
399 nullptr, loader_.ResourceRequestForReload(load_type, KURL(), 399 nullptr, loader_.ResourceRequestForReload(load_type, KURL(),
400 client_redirect_policy)); 400 client_redirect_policy));
401 request.SetClientRedirect(client_redirect_policy); 401 request.SetClientRedirect(client_redirect_policy);
402 loader_.Load(request, load_type); 402 loader_.Load(request, load_type);
403 } else { 403 } else {
404 DCHECK_EQ(kFrameLoadTypeReload, load_type); 404 DCHECK_EQ(RuntimeEnabledFeatures::locationHardReloadEnabled()
405 ? kFrameLoadTypeReloadBypassingCache
406 : kFrameLoadTypeReload,
407 load_type);
405 navigation_scheduler_->ScheduleReload(); 408 navigation_scheduler_->ScheduleReload();
406 } 409 }
407 } 410 }
408 411
409 void LocalFrame::Detach(FrameDetachType type) { 412 void LocalFrame::Detach(FrameDetachType type) {
410 // Note that detach() can be re-entered, so it's not possible to 413 // Note that detach() can be re-entered, so it's not possible to
411 // DCHECK(isAttached()) here. 414 // DCHECK(isAttached()) here.
412 lifecycle_.AdvanceTo(FrameLifecycle::kDetaching); 415 lifecycle_.AdvanceTo(FrameLifecycle::kDetaching);
413 416
414 if (IsLocalRoot()) 417 if (IsLocalRoot())
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 if (Client() && 966 if (Client() &&
964 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) { 967 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) {
965 params.MutableResourceRequest().SetPreviewsState( 968 params.MutableResourceRequest().SetPreviewsState(
966 params.GetResourceRequest().GetPreviewsState() | 969 params.GetResourceRequest().GetPreviewsState() |
967 WebURLRequest::kClientLoFiOn); 970 WebURLRequest::kClientLoFiOn);
968 params.SetAllowImagePlaceholder(); 971 params.SetAllowImagePlaceholder();
969 } 972 }
970 } 973 }
971 974
972 } // namespace blink 975 } // namespace blink
OLDNEW
« no previous file with comments | « content/public/common/content_features.cc ('k') | third_party/WebKit/Source/core/frame/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698