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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 | 1212 |
1213 // TODO(creis): Classify location.replace as NEW_PAGE instead of EXISTING_PAGE | 1213 // TODO(creis): Classify location.replace as NEW_PAGE instead of EXISTING_PAGE |
1214 // in https://crbug.com/596707. | 1214 // in https://crbug.com/596707. |
1215 | 1215 |
1216 NavigationEntryImpl* entry; | 1216 NavigationEntryImpl* entry; |
1217 if (params.intended_as_new_entry) { | 1217 if (params.intended_as_new_entry) { |
1218 // This was intended as a new entry but the pending entry was lost in the | 1218 // This was intended as a new entry but the pending entry was lost in the |
1219 // meanwhile and no new page was created. We are stuck at the last committed | 1219 // meanwhile and no new page was created. We are stuck at the last committed |
1220 // entry. | 1220 // entry. |
1221 entry = GetLastCommittedEntry(); | 1221 entry = GetLastCommittedEntry(); |
1222 CHECK(!is_in_page); | 1222 // If this is an in-page navigation, then there's no SSLStatus in the |
1223 entry->GetSSL() = handle->ssl_status(); | 1223 // NavigationHandle so don't overwrite the existing entry's SSLStatus. |
| 1224 if (!is_in_page) |
| 1225 entry->GetSSL() = handle->ssl_status(); |
1224 } else if (params.nav_entry_id) { | 1226 } else if (params.nav_entry_id) { |
1225 // This is a browser-initiated navigation (back/forward/reload). | 1227 // This is a browser-initiated navigation (back/forward/reload). |
1226 entry = GetEntryWithUniqueID(params.nav_entry_id); | 1228 entry = GetEntryWithUniqueID(params.nav_entry_id); |
1227 | 1229 |
1228 if (is_in_page) { | 1230 if (is_in_page) { |
1229 // There's no SSLStatus in the NavigationHandle for in-page navigations, | 1231 // There's no SSLStatus in the NavigationHandle for in-page navigations, |
1230 // so normally we leave |entry|'s SSLStatus as is. However if this was a | 1232 // so normally we leave |entry|'s SSLStatus as is. However if this was a |
1231 // restored in-page navigation entry, then it won't have an SSLStatus. So | 1233 // restored in-page navigation entry, then it won't have an SSLStatus. So |
1232 // we need to copy over the SSLStatus from the entry that navigated it. | 1234 // we need to copy over the SSLStatus from the entry that navigated it. |
1233 NavigationEntryImpl* last_entry = GetLastCommittedEntry(); | 1235 NavigationEntryImpl* last_entry = GetLastCommittedEntry(); |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 } | 2158 } |
2157 } | 2159 } |
2158 } | 2160 } |
2159 | 2161 |
2160 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2162 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2161 const base::Callback<base::Time()>& get_timestamp_callback) { | 2163 const base::Callback<base::Time()>& get_timestamp_callback) { |
2162 get_timestamp_callback_ = get_timestamp_callback; | 2164 get_timestamp_callback_ = get_timestamp_callback; |
2163 } | 2165 } |
2164 | 2166 |
2165 } // namespace content | 2167 } // namespace content |
OLD | NEW |