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

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 1975753006: Pull to refresh: Use new reload type RELOAD_MAIN_RESOURCE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review #14 and #16 Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index be6ff78076a4b513b0bcea39135ff7fe94f77d18..e75622886514500047b1627b4b0c18cb1e6e44ba 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -288,27 +288,12 @@ void NavigationControllerImpl::Reload(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD);
}
void NavigationControllerImpl::ReloadToRefreshContent(bool check_for_repost) {
+ ReloadType type = RELOAD;
if (base::FeatureList::IsEnabled(
features::kNonValidatingReloadOnRefreshContent)) {
- // Cause this reload to behave like NAVIGATION_TYPE_SAME_PAGE (e.g., enter
- // in the omnibox), so that the main resource is cache-validated but all
- // other resources use the cache as much as possible. This requires
- // navigating to the current URL in a new pending entry.
- // TODO(toyoshim): Introduce a new ReloadType for this behavior if it
- // becomes the default.
- NavigationEntryImpl* last_committed = GetLastCommittedEntry();
-
- // If the last committed entry does not exist, or a repost check dialog is
- // really needed, use a standard reload instead.
- if (last_committed &&
- !(check_for_repost && last_committed->GetHasPostData())) {
- LoadURL(last_committed->GetURL(), last_committed->GetReferrer(),
- last_committed->GetTransitionType(),
- last_committed->extra_headers());
- return;
- }
+ type = RELOAD_MAIN_RESOURCE;
}
- ReloadInternal(check_for_repost, RELOAD);
+ ReloadInternal(check_for_repost, type);
}
void NavigationControllerImpl::ReloadBypassingCache(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_BYPASSING_CACHE);
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698