summaryrefslogtreecommitdiffstats
path: root/content/browser/frame_host/navigation_controller_impl.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 11:02:20 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 11:02:20 +0000
commit25cd5f173929b2bec7e9c377b30c8fb2129fdcb0 (patch)
tree280842a36fa96e2ddeafc34e263610d0a5e43040 /content/browser/frame_host/navigation_controller_impl.cc
parentc4086a76b5b9353de699cb3293defb6c8c05a30e (diff)
downloadchromium_src-25cd5f173929b2bec7e9c377b30c8fb2129fdcb0.zip
chromium_src-25cd5f173929b2bec7e9c377b30c8fb2129fdcb0.tar.gz
chromium_src-25cd5f173929b2bec7e9c377b30c8fb2129fdcb0.tar.bz2
Fix referrer policy passing during redirects
We a redirect commits, we should take the referrer policy from the request we actually send and not from the one we intended to send. Also, when the renderer tells the browser about a new navigation, always update the referrer together with the URL Depends on https://codereview.chromium.org/126753002/ in blink BUG=331941 R=nasko@chromium.org TEST=browser_tests:ReferrerPolicyTest.* Review URL: https://codereview.chromium.org/128173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/frame_host/navigation_controller_impl.cc')
-rw-r--r--content/browser/frame_host/navigation_controller_impl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index d326f76..5b08aa1a 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);