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 55c5fa41d72e6f1f435093482dd176da73f556a6..fcfbc8d33c77444d27ad7d3e6005bd2a40e826fe 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl.cc |
| @@ -1186,6 +1186,11 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage( |
| } else if (params.nav_entry_id) { |
| // This is a browser-initiated navigation (back/forward/reload). |
| entry = GetEntryWithUniqueID(params.nav_entry_id); |
| + |
| + // Needed for the restore case, where the serialized NavigationEntry doesn't |
| + // have the SSL state. |
| + NavigationHandleImpl* handle = rfh->navigation_handle(); |
| + entry->GetSSL() = handle->ssl_status(); |
| } else { |
| // This is renderer-initiated. The only kinds of renderer-initated |
| // navigations that are EXISTING_PAGE are reloads and location.replace, |
| @@ -1260,6 +1265,11 @@ void NavigationControllerImpl::RendererDidNavigateToSamePage( |
| UpdateVirtualURLToURL(existing_entry, params.url); |
| existing_entry->SetURL(params.url); |
| + // If a user presses enter in the omnibox and the server redirects, the URL |
| + // might change (but it's still considered a SAME_PAGE navigation). So we must |
| + // update the SSL status. |
| + existing_entry->GetSSL() = rfh->navigation_handle()->ssl_status(); |
|
nasko
2016/09/01 15:48:45
Just out of curiousity, does the new test you adde
jam
2016/09/01 15:53:01
of course :)
|
| + |
| // Update the existing FrameNavigationEntry to ensure all of its members |
| // reflect the parameters coming from the renderer process. |
| existing_entry->AddOrUpdateFrameEntry( |