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

Unified Diff: content/browser/frame_host/frame_navigation_entry.h

Issue 1184423005: Add item and document sequence numbers to FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/frame_navigation_entry.h
diff --git a/content/browser/frame_host/frame_navigation_entry.h b/content/browser/frame_host/frame_navigation_entry.h
index 6fbd7541730e60ad6fba17ee69c0f7c7e1e869f6..323f0a036d830a507980efa67ef5042afb07665e 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -31,6 +31,8 @@ class CONTENT_EXPORT FrameNavigationEntry
// HistoryNode.
explicit FrameNavigationEntry(int64 frame_tree_node_id);
FrameNavigationEntry(int64 frame_tree_node_id,
+ int64 item_sequence_number,
+ int64 document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer);
@@ -40,7 +42,9 @@ class CONTENT_EXPORT FrameNavigationEntry
FrameNavigationEntry* Clone() const;
// Updates all the members of this entry.
- void UpdateEntry(SiteInstanceImpl* site_instance,
+ void UpdateEntry(int64 item_sequence_number,
+ int64 document_sequence_number,
+ SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
const PageState& page_state);
@@ -51,6 +55,20 @@ class CONTENT_EXPORT FrameNavigationEntry
// TODO(creis): Replace with frame sequence number or unique name.
int64 frame_tree_node_id() const { return frame_tree_node_id_; }
+ // Keeps track of where this entry belongs in the frame's session history.
+ // The item sequence number identifies each stop in the back/forward history
+ // and is globally unique. The document sequence number increments for each
+ // new document and is also globally unique. In-page navigations get a new
+ // item sequence number but the same document sequence number.
+ void set_item_sequence_number(int64 item_sequence_number) {
+ item_sequence_number_ = item_sequence_number;
+ }
+ int64 item_sequence_number() { return item_sequence_number_; }
+ void set_document_sequence_number(int64 document_sequence_number) {
+ document_sequence_number_ = document_sequence_number;
+ }
+ int64 document_sequence_number() { return document_sequence_number_; }
+
// The SiteInstance responsible for rendering this frame. All frames sharing
// a SiteInstance must live in the same process. This is a refcounted pointer
// that keeps the SiteInstance (not necessarily the process) alive as long as
@@ -84,6 +102,8 @@ class CONTENT_EXPORT FrameNavigationEntry
// See the accessors above for descriptions.
int64 frame_tree_node_id_;
+ int64 item_sequence_number_;
+ int64 document_sequence_number_;
scoped_refptr<SiteInstanceImpl> site_instance_;
GURL url_;
Referrer referrer_;

Powered by Google App Engine
This is Rietveld 408576698