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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 if (params.intended_as_new_entry) { 1167 if (params.intended_as_new_entry) {
1168 // This was intended as a new entry but the pending entry was lost in the 1168 // This was intended as a new entry but the pending entry was lost in the
1169 // meanwhile and no new page was created. We are stuck at the last committed 1169 // meanwhile and no new page was created. We are stuck at the last committed
1170 // entry. 1170 // entry.
1171 entry = GetLastCommittedEntry(); 1171 entry = GetLastCommittedEntry();
1172 } else if (params.nav_entry_id) { 1172 } else if (params.nav_entry_id) {
1173 // This is a browser-initiated navigation (back/forward/reload). 1173 // This is a browser-initiated navigation (back/forward/reload).
1174 entry = GetEntryWithUniqueID(params.nav_entry_id); 1174 entry = GetEntryWithUniqueID(params.nav_entry_id);
1175 1175
1176 // Needed for the restore case, where the serialized NavigationEntry doesn't 1176 // Needed for the restore case, where the serialized NavigationEntry doesn't
1177 // have the SSL state. 1177 // have the SSL state. Note that for in-page navigation, there's no
1178 entry->GetSSL() = handle->ssl_status(); 1178 // SSLStatus in the NavigationHandle so don't overwrite the existing entry's
1179 // SSLStatus.
1180 if (!is_in_page)
1181 entry->GetSSL() = handle->ssl_status();
1179 } else { 1182 } else {
1180 // This is renderer-initiated. The only kinds of renderer-initated 1183 // This is renderer-initiated. The only kinds of renderer-initated
1181 // navigations that are EXISTING_PAGE are reloads and location.replace, 1184 // navigations that are EXISTING_PAGE are reloads and location.replace,
1182 // which land us at the last committed entry. 1185 // which land us at the last committed entry.
1183 entry = GetLastCommittedEntry(); 1186 entry = GetLastCommittedEntry();
1184 1187
1185 // If this is an in-page navigation, then there's no SSLStatus in the 1188 // If this is an in-page navigation, then there's no SSLStatus in the
1186 // NavigationHandle so don't overwrite the existing entry's SSLStatus. 1189 // NavigationHandle so don't overwrite the existing entry's SSLStatus.
1187 if (!is_in_page) 1190 if (!is_in_page)
1188 entry->GetSSL() = handle->ssl_status(); 1191 entry->GetSSL() = handle->ssl_status();
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 } 2104 }
2102 } 2105 }
2103 } 2106 }
2104 2107
2105 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2108 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2106 const base::Callback<base::Time()>& get_timestamp_callback) { 2109 const base::Callback<base::Time()>& get_timestamp_callback) {
2107 get_timestamp_callback_ = get_timestamp_callback; 2110 get_timestamp_callback_ = get_timestamp_callback;
2108 } 2111 }
2109 2112
2110 } // namespace content 2113 } // namespace content
OLDNEW
« 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