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

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

Issue 2769033004: Should reset "Save-Data" header on all kinds of reloads (Closed)
Patch Set: test Created 3 years, 9 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 | third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5f8ca3e28039e6fc019e2d530e25f246699ca152..a220868732fec69b444aa1d15f19949d1cacc7db 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -375,7 +375,8 @@ void FrameFetchContext::addAdditionalRequestHeaders(ResourceRequest& request,
if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily())
return;
- if (masterDocumentLoader()->loadType() == FrameLoadTypeReload)
+ // Reload should reflect the current data saver setting.
+ if (isReloadLoadType(masterDocumentLoader()->loadType()))
request.clearHTTPHeaderField("Save-Data");
if (frame()->settings() && frame()->settings()->getDataSaverEnabled())
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698