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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 626913004: Set the ui::PAGE_TRANSITION_CLIENT_REDIRECT flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add testcase Created 6 years, 1 month 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index ffb0cfe11b9ad53199e9b7b2df660f50df16e9b4..f473a93201e317c57317a83b74a0539b165fa5f1 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2629,13 +2629,18 @@ void RenderFrameImpl::willSendRequest(
WebDataSource* data_source =
provisional_data_source ? provisional_data_source : top_data_source;
- ui::PageTransition transition_type = ui::PAGE_TRANSITION_LINK;
DocumentState* document_state = DocumentState::FromDataSource(data_source);
DCHECK(document_state);
InternalDocumentStateData* internal_data =
InternalDocumentStateData::FromDocumentState(document_state);
NavigationState* navigation_state = document_state->navigation_state();
- transition_type = navigation_state->transition_type();
+ ui::PageTransition transition_type = navigation_state->transition_type();
+ WebDataSource* frame_ds = frame->provisionalDataSource();
+ if (frame_ds && frame_ds->isClientRedirect()) {
+ transition_type = static_cast<ui::PageTransition>(
+ transition_type | ui::PAGE_TRANSITION_CLIENT_REDIRECT);
+ CHECK(ui::PageTransitionIsValidType(transition_type));
+ }
GURL request_url(request.url());
GURL new_url;

Powered by Google App Engine
This is Rietveld 408576698