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

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

Issue 128173002: Fix referrer policy passing during redirects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 11 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 | « chrome/browser/referrer_policy_browsertest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d326f761c06d4217e70a7c488dba6ff3fd6d8428..5b08aa1a89e148a73f4b44913a108cb7520dc899 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -308,6 +308,7 @@ void NavigationControllerImpl::ReloadInternal(bool check_for_repost,
// POST wasn't involved; the latter case avoids issues with sending data to
// the wrong page.
entry->SetURL(entry->GetOriginalRequestURL());
+ entry->SetReferrer(Referrer());
}
if (g_check_for_repost && check_for_repost &&
@@ -1056,6 +1057,7 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
// The URL may have changed due to redirects.
entry->SetURL(params.url);
+ entry->SetReferrer(params.referrer);
if (entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(entry, params.url);
@@ -1109,6 +1111,7 @@ void NavigationControllerImpl::RendererDidNavigateToSamePage(
if (existing_entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(existing_entry, params.url);
existing_entry->SetURL(params.url);
+ existing_entry->SetReferrer(params.referrer);
// The page may have been requested with a different HTTP method.
existing_entry->SetHasPostData(params.is_post);
« no previous file with comments | « chrome/browser/referrer_policy_browsertest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698