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 6614806ed86248252a72f68954eea952ad29cbc0..2e40e67098d6bce721bb60f9a96acc6fbe1c370c 100644 |
--- a/content/browser/frame_host/navigation_entry_impl.h |
+++ b/content/browser/frame_host/navigation_entry_impl.h |
@@ -37,19 +37,26 @@ class CONTENT_EXPORT NavigationEntryImpl |
TreeNode(FrameNavigationEntry* frame_entry); |
~TreeNode(); |
- // Returns whether this TreeNode corresponds to |frame_tree_node|. |
- bool MatchesFrame(FrameTreeNode* frame_tree_node) const; |
+ // Returns whether this TreeNode corresponds to |frame_tree_node|. If this |
+ // is called on the root TreeNode, then |is_root_tree_node| should be true |
+ // and we only check if |frame_tree_node| is the main frame. Otherwise, we |
+ // check if the unique name matches. |
+ bool MatchesFrame(FrameTreeNode* frame_tree_node, |
+ bool is_root_tree_node) const; |
// Recursively makes a deep copy of TreeNode with copies of each of the |
// FrameNavigationEntries in the subtree. Replaces the TreeNode |
// corresponding to |frame_tree_node| (and all of its children) with a new |
// TreeNode for |frame_navigation_entry|. Pass nullptr for both parameters |
// to make a complete clone. |
+ // |is_root_tree_node| indicates whether this is being called on the root |
+ // NavigationEntryImpl::TreeNode. |
// TODO(creis): For --site-per-process, share FrameNavigationEntries between |
// NavigationEntries of the same tab. |
std::unique_ptr<TreeNode> CloneAndReplace( |
FrameTreeNode* frame_tree_node, |
- FrameNavigationEntry* frame_navigation_entry) const; |
+ FrameNavigationEntry* frame_navigation_entry, |
+ bool is_root_tree_node) const; |
// Ref counted pointer that keeps the FrameNavigationEntry alive as long as |
// it is needed by this node's NavigationEntry. |
@@ -188,7 +195,6 @@ class CONTENT_EXPORT NavigationEntryImpl |
// 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, |
@@ -202,15 +208,6 @@ class CONTENT_EXPORT NavigationEntryImpl |
// 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; |
} |