summaryrefslogtreecommitdiffstats
path: root/content/browser/tab_contents/navigation_controller.h
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-30 19:01:19 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-30 19:01:19 +0000
commit867e1f971f72724f87bfa7c68c8b4742bfaab9ea (patch)
treec5c5670d23d6bf9f9689d997a8d052b84e262ca0 /content/browser/tab_contents/navigation_controller.h
parent1c34932902e6462e70980112ee045907492602c8 (diff)
downloadchromium_src-867e1f971f72724f87bfa7c68c8b4742bfaab9ea.zip
chromium_src-867e1f971f72724f87bfa7c68c8b4742bfaab9ea.tar.gz
chromium_src-867e1f971f72724f87bfa7c68c8b4742bfaab9ea.tar.bz2
Don't update URL bar or SSL icon for pending history navs until they commit.
BUG=89564 TEST=Go back or forward to a slow URL. No omnibox change until it commits. Review URL: http://codereview.chromium.org/7790018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/tab_contents/navigation_controller.h')
-rw-r--r--content/browser/tab_contents/navigation_controller.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/content/browser/tab_contents/navigation_controller.h b/content/browser/tab_contents/navigation_controller.h
index a01262d..c7d9d03 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_.