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

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

Issue 2450343002: Apply document's referrer policy on client-initiated reload (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/http/tests/security/resources/post-referrer-on-reload.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 21ebb27a45c63282e458d10566a91706d621b098..9dfe1ca8fe5ade5a5e2771bd929bc7eb76e36a8c 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -168,8 +168,9 @@ ResourceRequest FrameLoader::resourceRequestForReload(
// was initiated by something in the current document and should therefore
// show the current document's url as the referrer.
if (clientRedirectPolicy == ClientRedirectPolicy::ClientRedirect) {
- request.setHTTPReferrer(Referrer(m_frame->document()->outgoingReferrer(),
- m_frame->document()->getReferrerPolicy()));
+ request.setHTTPReferrer(SecurityPolicy::generateReferrer(
+ m_frame->document()->getReferrerPolicy(), m_frame->document()->url(),
+ m_frame->document()->outgoingReferrer()));
}
if (!overrideURL.isEmpty()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/resources/post-referrer-on-reload.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698