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..8e6428955b9cc63eaeb631c41eea4d20207d5ce1 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -105,7 +105,18 @@ void MakeNavigateParams(const NavigationEntryImpl& entry, |
entry.GetBrowserInitiatedPostData()->size()); |
} |
- params->redirects = entry.redirect_chain(); |
+ // We no longer clear redirects in the navigation entry upon commit, so |
brettw
2014/03/27 22:16:22
This comment only makes sense in the context of th
donnd
2014/03/28 03:11:38
I should have known better than to write a non-dur
|
+ // we need to clear them when returning to a previously committed navigation. |
+ // Those cases are reload and forward/back. |
+ bool is_transition_reload = PageTransitionCoreTypeIs( |
+ params->transition, content::PAGE_TRANSITION_RELOAD); |
+ bool is_transition_forward_back = PageTransitionIsForwardBack( |
+ params->transition); |
+ if (is_transition_forward_back || is_transition_reload) { |
+ params->redirects = std::vector<GURL>(); |
brettw
2014/03/27 22:16:22
Actually, I'm curious why you need to not send the
donnd
2014/03/28 03:11:38
No, the old behavior was to preserve the redirects
|
+ } else { |
+ params->redirects = entry.GetRedirectChain(); |
+ } |
params->can_load_local_resources = entry.GetCanLoadLocalResources(); |
params->frame_to_navigate = entry.GetFrameToNavigate(); |
@@ -168,7 +179,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_) |