Index: content/browser/frame_host/navigator_impl.cc |
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc |
index f01dc531fca5073272ebf8e64a56d9a65e265bc1..38d09ece5e8ad61f1833d5f0fd7271318dc63864 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -105,7 +105,17 @@ void MakeNavigateParams(const NavigationEntryImpl& entry, |
entry.GetBrowserInitiatedPostData()->size()); |
} |
- params->redirects = entry.redirect_chain(); |
+ // Set the redirect chain to the navigation's redirects, unless we are |
+ // returning to a completed navigation (whose previous redirects don't apply). |
+ bool is_transition_reload = PageTransitionCoreTypeIs( |
+ params->transition, content::PAGE_TRANSITION_RELOAD); |
+ bool is_transition_forward_back = PageTransitionIsForwardBack( |
Charlie Reis
2014/03/31 22:06:08
Does PageTransitionIsRedirect not suffice here?
donnd
2014/04/01 04:36:26
No, returning to any previously committed navigati
brettw
2014/04/01 06:28:52
Ah, so this answer seems to be different than we w
donnd
2014/04/01 18:31:09
No, they need to be preserved in the original navi
|
+ params->transition); |
+ if (is_transition_forward_back || is_transition_reload) { |
+ params->redirects = std::vector<GURL>(); |
+ } else { |
+ params->redirects = entry.GetRedirectChain(); |
+ } |
params->can_load_local_resources = entry.GetCanLoadLocalResources(); |
params->frame_to_navigate = entry.GetFrameToNavigate(); |
@@ -168,7 +178,7 @@ void NavigatorImpl::DidStartProvisionalLoad( |
entry->set_transferred_global_request_id( |
pending_entry->transferred_global_request_id()); |
entry->set_should_replace_entry(pending_entry->should_replace_entry()); |
- entry->set_redirect_chain(pending_entry->redirect_chain()); |
+ entry->SetRedirectChain(pending_entry->GetRedirectChain()); |
} |
controller_->SetPendingEntry(entry); |
if (delegate_) |