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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 7790018: Don't update URL bar or SSL icon for pending history navs until they commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/tab_contents/navigation_controller.cc
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index 315a47110bb8661c0e91c1ceb31b4f643c9b59c0..85780cdbe06e065fbca7ec16c313d124502f4ea1 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -285,6 +285,15 @@ NavigationEntry* NavigationController::GetActiveEntry() const {
return GetLastCommittedEntry();
}
+NavigationEntry* NavigationController::GetVisibleEntry() const {
+ if (transient_entry_index_ != -1)
+ return entries_[transient_entry_index_].get();
+ // Only return pending_entry for new navigations.
+ if (pending_entry_ && pending_entry_->page_id() == -1)
+ return pending_entry_;
+ return GetLastCommittedEntry();
+}
+
int NavigationController::GetCurrentEntryIndex() const {
if (transient_entry_index_ != -1)
return transient_entry_index_;
« no previous file with comments | « content/browser/tab_contents/navigation_controller.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698