Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1179 | 1179 |
| 1180 NavigationEntryImpl* entry; | 1180 NavigationEntryImpl* entry; |
| 1181 if (params.intended_as_new_entry) { | 1181 if (params.intended_as_new_entry) { |
| 1182 // This was intended as a new entry but the pending entry was lost in the | 1182 // This was intended as a new entry but the pending entry was lost in the |
| 1183 // meanwhile and no new page was created. We are stuck at the last committed | 1183 // meanwhile and no new page was created. We are stuck at the last committed |
| 1184 // entry. | 1184 // entry. |
| 1185 entry = GetLastCommittedEntry(); | 1185 entry = GetLastCommittedEntry(); |
| 1186 } else if (params.nav_entry_id) { | 1186 } else if (params.nav_entry_id) { |
| 1187 // This is a browser-initiated navigation (back/forward/reload). | 1187 // This is a browser-initiated navigation (back/forward/reload). |
| 1188 entry = GetEntryWithUniqueID(params.nav_entry_id); | 1188 entry = GetEntryWithUniqueID(params.nav_entry_id); |
| 1189 | |
| 1190 // Needed for the restore case, where the serialized NavigationEntry doesn't | |
| 1191 // have the SSL state. | |
| 1192 NavigationHandleImpl* handle = rfh->navigation_handle(); | |
| 1193 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.
| |
| 1189 } else { | 1194 } else { |
| 1190 // This is renderer-initiated. The only kinds of renderer-initated | 1195 // This is renderer-initiated. The only kinds of renderer-initated |
| 1191 // navigations that are EXISTING_PAGE are reloads and location.replace, | 1196 // navigations that are EXISTING_PAGE are reloads and location.replace, |
| 1192 // which land us at the last committed entry. | 1197 // which land us at the last committed entry. |
| 1193 entry = GetLastCommittedEntry(); | 1198 entry = GetLastCommittedEntry(); |
| 1194 } | 1199 } |
| 1195 DCHECK(entry); | 1200 DCHECK(entry); |
| 1196 | 1201 |
| 1197 // The URL may have changed due to redirects. | 1202 // The URL may have changed due to redirects. |
| 1198 entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR | 1203 entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2101 } | 2106 } |
| 2102 } | 2107 } |
| 2103 } | 2108 } |
| 2104 | 2109 |
| 2105 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2110 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2106 const base::Callback<base::Time()>& get_timestamp_callback) { | 2111 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2107 get_timestamp_callback_ = get_timestamp_callback; | 2112 get_timestamp_callback_ = get_timestamp_callback; |
| 2108 } | 2113 } |
| 2109 | 2114 |
| 2110 } // namespace content | 2115 } // namespace content |
| OLD | NEW |