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

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

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
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | content/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_controller.h
diff --git a/content/browser/tab_contents/navigation_controller.h b/content/browser/tab_contents/navigation_controller.h
index a01262d5e33548742656605fccb0e597d683e4b4..c7d9d0318ac68ce206a3a8fc4d843deef48bc7d8 100644
--- a/content/browser/tab_contents/navigation_controller.h
+++ b/content/browser/tab_contents/navigation_controller.h
@@ -78,9 +78,18 @@ class NavigationController {
// NOTE: This can be NULL!!
//
// If you are trying to get the current state of the NavigationController,
- // this is the method you will typically want to call.
+ // this is the method you will typically want to call. If you want to display
+ // the active entry to the user (e.g., in the location bar), use
+ // GetVisibleEntry instead.
NavigationEntry* GetActiveEntry() const;
+ // Returns the same entry as GetActiveEntry, except that it ignores pending
+ // history navigation entries. This should be used when displaying info to
+ // the user, so that the location bar and other indicators do not update for
+ // a back/forward navigation until the pending entry commits. This approach
+ // guards against URL spoofs on slow history navigations.
+ NavigationEntry* GetVisibleEntry() const;
+
// Returns the index from which we would go back/forward or reload. This is
// the last_committed_entry_index_ if pending_entry_index_ is -1. Otherwise,
// it is the pending_entry_index_.
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | content/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698