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

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

Issue 10448014: Fix utterly wrong comment that hasn't been true for years. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/navigation_controller.h
diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h
index 4829349e8930ebc4eb0eb4a4fe488833dcb57011..c9c1a01384a76cd56736af5fe1bc2e9e5c4ec4fd 100644
--- a/content/public/browser/navigation_controller.h
+++ b/content/public/browser/navigation_controller.h
@@ -24,11 +24,11 @@ class SessionStorageNamespace;
class WebContents;
struct Referrer;
-// A NavigationController maintains the back-forward list for a single tab and
+// A NavigationController maintains the back-forward list for a WebContents and
// manages all navigation within that list.
//
-// The NavigationController also owns all WebContents for the tab. This is to
-// make sure that we have at most one WebContents instance per type.
+// Each NavigationController belongs to one WebContents; each WebContents has
+// exactly one NavigationController.
class NavigationController {
public:
enum ReloadType {
@@ -37,9 +37,9 @@ class NavigationController {
RELOAD_IGNORING_CACHE // Reload bypassing the cache, aka shift-reload.
};
- // Creates navigation entry and translates the virtual url to a real one.
- // Used when navigating to a new URL using LoadURL. Extra headers are
- // separated by \n.
+ // Creates a navigation entry and translates the virtual url to a real one.
+ // This is a general call; prefer LoadURL[FromRenderer]/TransferURL below.
+ // Extra headers are separated by \n.
CONTENT_EXPORT static NavigationEntry* CreateNavigationEntry(
const GURL& url,
const Referrer& referrer,
@@ -54,8 +54,8 @@ class NavigationController {
virtual ~NavigationController() {}
- // Returns the web contents associated with this controller. Non-NULL except
- // during set-up of the tab.
+ // Returns the web contents associated with this controller. It can never be
+ // NULL.
virtual WebContents* GetWebContents() const = 0;
// Get/set the browser context for this controller. It can never be NULL.
@@ -73,6 +73,17 @@ class NavigationController {
bool from_last_session,
std::vector<NavigationEntry*>* entries) = 0;
+ // Entries -------------------------------------------------------------------
+
+ // There are two basic states for entries: pending and committed. When an
+ // entry is navigated to, a request is sent to the server. While that request
+ // has not been responded to, the NavigationEntry is pending. Once data is
+ // received for that entry, that NavigationEntry is committed.
+
+ // A transient entry is an entry that, when the user navigates away, is
+ // removed and discarded rather than being added to the back-forward list.
+ // Transient entries are useful for interstitial pages and the like.
+
// Active entry --------------------------------------------------------------
// Returns the active entry, which is the transient entry if any, the pending
« 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