| Index: content/browser/frame_host/navigation_entry_impl.h
|
| diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
|
| index 801a72bc23a43df71cec742ad30926f3fb7e5c40..5907b6c2bd5992a25d6671a20c1c8ad3582da799 100644
|
| --- a/content/browser/frame_host/navigation_entry_impl.h
|
| +++ b/content/browser/frame_host/navigation_entry_impl.h
|
| @@ -37,11 +37,8 @@
|
| TreeNode(FrameNavigationEntry* frame_entry);
|
| ~TreeNode();
|
|
|
| - // Returns whether this TreeNode corresponds to |frame_tree_node|, based on
|
| - // the FrameTreeNode ID or unique name. If the unique name matches and
|
| - // FrameTreeNode ID does not, then this will update the entry's
|
| - // FrameTreeNode ID (which may be stale if the node was recreated).
|
| - bool MatchesFrame(FrameTreeNode* frame_tree_node);
|
| + // Returns whether this TreeNode corresponds to |frame_tree_node|.
|
| + bool MatchesFrame(FrameTreeNode* frame_tree_node) const;
|
|
|
| // Recursively makes a deep copy of TreeNode with copies of each of the
|
| // FrameNavigationEntries in the subtree. Replaces the TreeNode
|
| @@ -52,7 +49,7 @@
|
| // NavigationEntries of the same tab.
|
| std::unique_ptr<TreeNode> CloneAndReplace(
|
| FrameTreeNode* frame_tree_node,
|
| - FrameNavigationEntry* frame_navigation_entry);
|
| + FrameNavigationEntry* frame_navigation_entry) const;
|
|
|
| // Ref counted pointer that keeps the FrameNavigationEntry alive as long as
|
| // it is needed by this node's NavigationEntry.
|
| @@ -191,6 +188,7 @@
|
| // Does nothing if there is no entry already and |url| is about:blank, since
|
| // that does not count as a real commit.
|
| void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node,
|
| + const std::string& frame_unique_name,
|
| int64_t item_sequence_number,
|
| int64_t document_sequence_number,
|
| SiteInstanceImpl* site_instance,
|
| @@ -199,10 +197,17 @@
|
| const PageState& page_state);
|
|
|
| // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if
|
| - // there is one in this NavigationEntry. This compares against the
|
| - // FrameTreeNode ID first, and if that doesn't match, then the unique_name.
|
| - // It will update the FrameNavigationEntry's FrameTreeNode ID if it is stale.
|
| - FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node);
|
| + // there is one in this NavigationEntry.
|
| + FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const;
|
| +
|
| + // Returns the FrameNavigationEntry corresponding to the frame with the given
|
| + // |unique_name|, if any. This is useful when the FrameTreeNode cannot be used
|
| + // to find the entry, such as for a newly created subframe in a history
|
| + // navigation. Callers should update the FrameTreeNode ID of the entry so that
|
| + // it can be found with |GetFrameEntry| above.
|
| + // TODO(creis): Generate or verify the unique_name in the browser process.
|
| + FrameNavigationEntry* GetFrameEntryByUniqueName(
|
| + const std::string& unique_name) const;
|
|
|
| void set_unique_id(int unique_id) {
|
| unique_id_ = unique_id;
|
| @@ -359,7 +364,8 @@
|
|
|
| private:
|
| // Finds the TreeNode associated with |frame_tree_node|, if any.
|
| - NavigationEntryImpl::TreeNode* FindFrameEntry(FrameTreeNode* frame_tree_node);
|
| + NavigationEntryImpl::TreeNode* FindFrameEntry(
|
| + FrameTreeNode* frame_tree_node) const;
|
|
|
| // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
| // Session/Tab restore save portions of this class so that it can be recreated
|
|
|