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

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2299843002: Fix the page's SSL status not being set on restore. (Closed)
Patch Set: add regression test and fix failing tests from initial patch Created 4 years, 4 months 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/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..97020c8164df8e91ff1edac7a2577e00b2e20d2b 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();
nasko 2016/09/01 01:35:29 I think we might need this to happen also in Rende
jam 2016/09/01 02:58:56 I tried pressing enter in the omnibox and it goes
nasko 2016/09/01 06:27:55 They key part is for the server to do a redirect.
jam 2016/09/01 15:44:09 Got it, thanks. Ok I added a test and a fix.
} else {
// This is renderer-initiated. The only kinds of renderer-initated
// navigations that are EXISTING_PAGE are reloads and location.replace,
« chrome/browser/ssl/ssl_browser_tests.cc ('K') | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698