Chromium Code Reviews| Index: content/browser/frame_host/navigation_controller_impl.cc |
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
| index ffcd8eedd6ae59f0b8e228a1ed701b16c9ab9e2f..ecee3ff57ab4d532e54ac2419be2f73e65e05841 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl.cc |
| @@ -1127,7 +1127,20 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( |
| // type must always be normal or error. |
| new_entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR |
| : PAGE_TYPE_NORMAL); |
| - new_entry->SetURL(params.url); |
| + if (params.url != new_entry->GetURL()) { |
|
estark
2016/08/15 08:14:08
Is this check just an optimization? I'm concerned
jam
2016/08/15 19:23:58
It wasn't; looking at it again it was poorly writt
mmenke
2016/08/15 22:48:31
It could be two different servers with the same ho
|
| + new_entry->SetURL(params.url); |
| + // New URL means that we can't use the old SSLStatus. |
| + new_entry->GetSSL() = SSLStatus(); |
| + } |
| + |
| + if (rfh->frame_tree_node()->IsMainFrame()) { |
| + // In case of redirects (same process or across different ones), the |
| + // SSLStatus was cached on the pending RFH so use it now. |
| + SSLStatus ssl_status; |
| + if (rfh->GetSSLStatusForPendingNavigate(params.url, &ssl_status)) |
|
estark
2016/08/15 08:14:08
Just checking -- we're guaranteed that the returne
jam
2016/08/15 19:23:58
I don't think this is guaranteed. i.e. in the Site
|
| + new_entry->GetSSL() = ssl_status; |
| + } |
| + |
| if (update_virtual_url) |
| UpdateVirtualURLToURL(new_entry.get(), params.url); |
| new_entry->SetReferrer(params.referrer); |