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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2433743004: PlzNavigate: Transmit referrer into FrameNavigationEntry. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a97f03a27bbd36c0d69fea2464bbd99f656c3d84..8e2456e8181750f34f2c6f9c72e7fe812c520dee 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4808,6 +4808,16 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
params.is_srcdoc = params.url == GURL(content::kAboutSrcDocURL);
+ // If the page contained a client redirect (meta refresh, document.loc...),
+ // set the referrer appropriately.
+ if (ds->isClientRedirect()) {
clamy 2016/10/19 14:34:51 This is happening in the middle of the non-PlzNavi
Charlie Reis 2016/10/21 20:15:57 Good catch! It does look like we were missing the
+ params.referrer =
+ Referrer(params.redirects[0], ds->request().referrerPolicy());
+ } else {
+ params.referrer =
+ RenderViewImpl::GetReferrerFromRequest(frame, ds->request());
+ }
+
if (!frame->parent()) {
// Top-level navigation.
@@ -4860,15 +4870,10 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
}
// If the page contained a client redirect (meta refresh, document.loc...),
- // set the referrer and transition appropriately.
+ // set the transition appropriately.
if (ds->isClientRedirect()) {
- params.referrer =
- Referrer(params.redirects[0], ds->request().referrerPolicy());
params.transition = ui::PageTransitionFromInt(
params.transition | ui::PAGE_TRANSITION_CLIENT_REDIRECT);
- } else {
- params.referrer = RenderViewImpl::GetReferrerFromRequest(
- frame, ds->request());
}
// When using subframe navigation entries, method and post id have already
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698