Index: content/browser/frame_host/navigation_entry_impl.cc |
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc |
index fbf56542c1609eae1051a8926899c51de2ef4d93..65399b2270b9d1b059d742cf49a5121ef5f08263 100644 |
--- a/content/browser/frame_host/navigation_entry_impl.cc |
+++ b/content/browser/frame_host/navigation_entry_impl.cc |
@@ -691,7 +691,7 @@ RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
const FrameNavigationEntry& frame_entry, |
bool is_same_document_history_load, |
bool is_history_navigation_in_new_child, |
- bool has_subtree_history_items, |
+ const std::set<std::string>& subframe_unique_names, |
bool has_committed_real_load, |
bool intended_as_new_entry, |
int pending_history_list_offset, |
@@ -720,7 +720,7 @@ RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), |
base::Time::Now(), frame_entry.page_state(), GetPageID(), GetUniqueID(), |
is_same_document_history_load, is_history_navigation_in_new_child, |
- has_subtree_history_items, has_committed_real_load, intended_as_new_entry, |
+ subframe_unique_names, has_committed_real_load, intended_as_new_entry, |
pending_offset_to_send, current_offset_to_send, current_length_to_send, |
IsViewSourceMode(), should_clear_history_list()); |
#if defined(OS_ANDROID) |
@@ -847,10 +847,16 @@ FrameNavigationEntry* NavigationEntryImpl::GetFrameEntry( |
return tree_node ? tree_node->frame_entry.get() : nullptr; |
} |
-bool NavigationEntryImpl::HasSubtreeHistoryItems( |
+std::set<std::string> NavigationEntryImpl::GetSubframeUniqueNames( |
FrameTreeNode* frame_tree_node) const { |
+ std::set<std::string> names; |
NavigationEntryImpl::TreeNode* tree_node = FindFrameEntry(frame_tree_node); |
- return tree_node && !tree_node->children.empty(); |
+ if (tree_node) { |
+ // Return the names of all immediate children. |
+ for (TreeNode* child : tree_node->children) |
+ names.insert(child->frame_entry->frame_unique_name()); |
+ } |
+ return names; |
} |
void NavigationEntryImpl::ClearStaleFrameEntriesForNewFrame( |