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

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

Issue 1493403002: Make pull to refresh not perform regular reload (with cache revalidation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 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 side-by-side diff with in-line comments
Download patch
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 bf5dcff69d563d16586e4bf54f2f5434265ffdcd..3ff0d6b42786aa44809976cafb67b92858d20f61 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -74,6 +74,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_switches.h"
#include "media/base/mime_util.h"
#include "net/base/escape.h"
#include "net/base/net_util.h"
@@ -290,6 +291,14 @@ void NavigationControllerImpl::Restore(
void NavigationControllerImpl::Reload(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD);
}
+void NavigationControllerImpl::ReloadToRefreshContent(bool check_for_repost) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNonValidatingReloadOnRefreshContent)) {
+ ReloadInternal(check_for_repost, NO_RELOAD);
+ } else {
+ ReloadInternal(check_for_repost, RELOAD);
+ }
+}
void NavigationControllerImpl::ReloadIgnoringCache(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_IGNORING_CACHE);
}

Powered by Google App Engine
This is Rietveld 408576698