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

Unified Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 2316003002: Notify the renderer if a history navigation has no subframe items. (Closed)
Patch Set: Fix indent. Created 4 years, 3 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/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 31b1d508e8ee0a7f70a5fdbc9a28b5e169c5d57e..fbf56542c1609eae1051a8926899c51de2ef4d93 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -691,6 +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,
bool has_committed_real_load,
bool intended_as_new_entry,
int pending_history_list_offset,
@@ -719,9 +720,9 @@ 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_committed_real_load, intended_as_new_entry, pending_offset_to_send,
- current_offset_to_send, current_length_to_send, IsViewSourceMode(),
- should_clear_history_list());
+ has_subtree_history_items, 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)
if (GetDataURLAsString() &&
GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) {
@@ -846,6 +847,12 @@ FrameNavigationEntry* NavigationEntryImpl::GetFrameEntry(
return tree_node ? tree_node->frame_entry.get() : nullptr;
}
+bool NavigationEntryImpl::HasSubtreeHistoryItems(
+ FrameTreeNode* frame_tree_node) const {
+ NavigationEntryImpl::TreeNode* tree_node = FindFrameEntry(frame_tree_node);
+ return tree_node && !tree_node->children.empty();
+}
+
void NavigationEntryImpl::ClearStaleFrameEntriesForNewFrame(
FrameTreeNode* frame_tree_node) {
DCHECK(!frame_tree_node->IsMainFrame());
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698