Index: content/browser/frame_host/navigation_controller_impl.cc |
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
index c4f05fdc199d2560d08acd5ded513397d745ec17..709873aa23d5633922ef4060444d8efa6d6fdd3e 100644 |
--- a/content/browser/frame_host/navigation_controller_impl.cc |
+++ b/content/browser/frame_host/navigation_controller_impl.cc |
@@ -1735,6 +1735,25 @@ void NavigationControllerImpl::DiscardPendingEntry() { |
pending_entry_index_ = -1; |
} |
+void NavigationControllerImpl::FillHistoryParametersForNavigationEntry( |
+ const NavigationEntryImpl& entry, |
+ int* pending_history_list_offset, |
+ int* current_history_list_offset, |
+ int* current_history_list_length) const { |
+ if (entry.should_clear_history_list()) { |
+ // Set the history list related parameters to the same values a |
+ // NavigationController would return before its first navigation. This will |
+ // fully clear the RenderView's view of the session history. |
+ *pending_history_list_offset = -1; |
+ *current_history_list_offset = -1; |
+ *current_history_list_length = 0; |
+ } else { |
+ *pending_history_list_offset = GetIndexOfEntry(&entry); |
+ *current_history_list_offset = GetLastCommittedEntryIndex(); |
+ *current_history_list_length = GetEntryCount(); |
+ } |
+} |
+ |
void NavigationControllerImpl::DiscardTransientEntry() { |
if (transient_entry_index_ == -1) |
return; |