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

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: rebase 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..5a34b5695de836c3d7b966d49731468fa1c46378 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, RELOAD_IGNORING_CACHE);
newt (away) 2015/12/15 22:40:21 Why RELOAD_IGNORING_CACHE? Seems like we want "NO_
kinuko 2015/12/15 22:54:38 Oops my bad, I was experimenting multiple flags an
+ } else {
+ ReloadInternal(check_for_repost, NO_RELOAD);
+ }
+}
void NavigationControllerImpl::ReloadIgnoringCache(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_IGNORING_CACHE);
}

Powered by Google App Engine
This is Rietveld 408576698