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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2934493002: Fix SSL indicator missing when doing fast back/forward navigations. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 entry->GetSSL() = handle->ssl_status(); 1300 // Only copy in the restore case since this code path can be taken during
1301 // navigation. See http://crbug.com/727892
1302 if (was_restored)
1303 entry->GetSSL() = handle->ssl_status();
1301 } 1304 }
1302 } else { 1305 } else {
1303 // This is renderer-initiated. The only kinds of renderer-initated 1306 // This is renderer-initiated. The only kinds of renderer-initated
1304 // navigations that are EXISTING_PAGE are reloads and location.replace, 1307 // navigations that are EXISTING_PAGE are reloads and location.replace,
1305 // which land us at the last committed entry. 1308 // which land us at the last committed entry.
1306 entry = GetLastCommittedEntry(); 1309 entry = GetLastCommittedEntry();
1307 1310
1308 // If this is a same document navigation, then there's no SSLStatus in the 1311 // If this is a same document navigation, then there's no SSLStatus in the
1309 // NavigationHandle so don't overwrite the existing entry's SSLStatus. 1312 // NavigationHandle so don't overwrite the existing entry's SSLStatus.
1310 if (!is_same_document) 1313 if (!is_same_document)
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 DCHECK(pending_entry_index_ == -1 || 2234 DCHECK(pending_entry_index_ == -1 ||
2232 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); 2235 pending_entry_ == GetEntryAtIndex(pending_entry_index_));
2233 } 2236 }
2234 2237
2235 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2238 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2236 const base::Callback<base::Time()>& get_timestamp_callback) { 2239 const base::Callback<base::Time()>& get_timestamp_callback) {
2237 get_timestamp_callback_ = get_timestamp_callback; 2240 get_timestamp_callback_ = get_timestamp_callback;
2238 } 2241 }
2239 2242
2240 } // namespace content 2243 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698