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

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

Issue 483773002: PlzNavigate: implement CommitNavigation on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 6 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_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;

Powered by Google App Engine
This is Rietveld 408576698