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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 // navigated it. | 1290 // navigated it. |
1291 NavigationEntryImpl* last_entry = GetLastCommittedEntry(); | 1291 NavigationEntryImpl* last_entry = GetLastCommittedEntry(); |
1292 if (entry->GetURL().GetOrigin() == last_entry->GetURL().GetOrigin() && | 1292 if (entry->GetURL().GetOrigin() == last_entry->GetURL().GetOrigin() && |
1293 last_entry->GetSSL().initialized && !entry->GetSSL().initialized && | 1293 last_entry->GetSSL().initialized && !entry->GetSSL().initialized && |
1294 was_restored) { | 1294 was_restored) { |
1295 entry->GetSSL() = last_entry->GetSSL(); | 1295 entry->GetSSL() = last_entry->GetSSL(); |
1296 } | 1296 } |
1297 } else { | 1297 } else { |
1298 // When restoring a tab, the serialized NavigationEntry doesn't have the | 1298 // When restoring a tab, the serialized NavigationEntry doesn't have the |
1299 // SSL state. | 1299 // SSL state. |
1300 // Only copy in the restore case since this code path can be taken during | 1300 entry->GetSSL() = handle->ssl_status(); |
1301 // navigation. See http://crbug.com/727892 | |
1302 if (was_restored) | |
1303 entry->GetSSL() = handle->ssl_status(); | |
1304 } | 1301 } |
1305 } else { | 1302 } else { |
1306 // This is renderer-initiated. The only kinds of renderer-initated | 1303 // This is renderer-initiated. The only kinds of renderer-initated |
1307 // navigations that are EXISTING_PAGE are reloads and location.replace, | 1304 // navigations that are EXISTING_PAGE are reloads and location.replace, |
1308 // which land us at the last committed entry. | 1305 // which land us at the last committed entry. |
1309 entry = GetLastCommittedEntry(); | 1306 entry = GetLastCommittedEntry(); |
1310 | 1307 |
1311 // If this is a same document navigation, then there's no SSLStatus in the | 1308 // If this is a same document navigation, then there's no SSLStatus in the |
1312 // NavigationHandle so don't overwrite the existing entry's SSLStatus. | 1309 // NavigationHandle so don't overwrite the existing entry's SSLStatus. |
1313 if (!is_same_document) | 1310 if (!is_same_document) |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 DCHECK(pending_entry_index_ == -1 || | 2239 DCHECK(pending_entry_index_ == -1 || |
2243 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); | 2240 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); |
2244 } | 2241 } |
2245 | 2242 |
2246 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2243 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2247 const base::Callback<base::Time()>& get_timestamp_callback) { | 2244 const base::Callback<base::Time()>& get_timestamp_callback) { |
2248 get_timestamp_callback_ = get_timestamp_callback; | 2245 get_timestamp_callback_ = get_timestamp_callback; |
2249 } | 2246 } |
2250 | 2247 |
2251 } // namespace content | 2248 } // namespace content |
OLD | NEW |