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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

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
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 17bfc33d25547ed9cc7f4d10fc25accad84c2389..cb8df20ff7168ec471711189845b81f17b9434b8 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -104,7 +104,7 @@ bool shouldDisallowFetchForMainFrameScript(const ResourceRequest& request, Fetch
// recover if blocking of a script is leading to a page break and the user
// reloads the page.
const FrameLoadType loadType = document.frame()->loader().loadType();
- const bool isReload = loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadBypassingCache || loadType == FrameLoadTypeSame;
+ const bool isReload = loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadBypassingCache || loadType == FrameLoadTypeReloadMainResource;
if (isReload) {
// Recording this metric since an increase in number of reloads for pages
// where a script was blocked could be indicative of a page break.
@@ -235,7 +235,7 @@ WebCachePolicy FrameFetchContext::resourceRequestCachePolicy(const ResourceReque
return WebCachePolicy::ReturnCacheDataDontLoad;
if (!frame()->host()->overrideEncoding().isEmpty())
return WebCachePolicy::ReturnCacheDataElseLoad;
- if (frameLoadType == FrameLoadTypeSame || request.isConditional() || request.httpMethod() == "POST")
+ if (frameLoadType == FrameLoadTypeReloadMainResource || request.isConditional() || request.httpMethod() == "POST")
return WebCachePolicy::ValidatingCacheData;
for (Frame* f = frame(); f; f = f->tree().parent()) {
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698