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

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

Issue 2348203003: Fix navigations after HTML5 history push losing their SSL status. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7efd66c4e1536e8060d3047c8d0082963bebccd4..c0ddb1b926e0af03b8758c235c8e8a4026164be5 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1174,8 +1174,11 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
entry = GetEntryWithUniqueID(params.nav_entry_id);
// Needed for the restore case, where the serialized NavigationEntry doesn't
- // have the SSL state.
- entry->GetSSL() = handle->ssl_status();
+ // have the SSL state. Note that for in-page navigation, there's no
+ // SSLStatus in the NavigationHandle so don't overwrite the existing entry's
+ // SSLStatus.
+ if (!is_in_page)
+ 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,
« no previous file with comments | « 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