Always use the referrer used to load the document on same-document navigations #29342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DidCommitProvisionalLoadParams has the
referrer
param that is usedto save the
referrer
attribute in FrameNavigationEntry after commit.Currently, most same-document navigations will use the initial referrer
that's used to load the document, even after several navigations. An
exception to this is if the navigation is classified as a client-side
redirect, in which case the previous URL is used. This seems to be
accidental, as the
referrer_
that's tracked in the DocumentLoader isnever actually updated for these navigations, so future same-document
navigations will still use the initial referrer that's used to load the
document.
This CL removes the special behavior for client-side redirect same-doc
navigations, to make the behavior more predictable, making it easier
to calculate the
referrer
param in the browser in the future, and alsoallows us to remove the redirect chain in the renderer completely in
crrev.com/c/2933038.
Bug: 1171210, 1131832
Change-Id: If460d5fe08ab5795b3dd4d69b0188289d8253839
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2938762
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: David Van Cleve <davidvc@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/master@{#892950}