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

Unified Diff: content/renderer/history_controller.cc

Issue 266013002: Remove HistoryController::GetPreviousEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase; remove browser half of quirk. Created 6 years, 7 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
« no previous file with comments | « content/renderer/history_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_controller.cc
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index b120198871b323466cc3e4f88dce0e3174d63deb..4c171510fc802e23700404b5477d146b64b8584e 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -76,14 +76,6 @@ void HistoryController::GoToEntry(scoped_ptr<HistoryEntry> target_entry,
// navigation, so we can safely assume this is the different document case.
different_document_loads.push_back(
std::make_pair(main_frame, provisional_entry_->root()));
- } else if (different_document_loads.empty()) {
- // If we have only same document navigations to perform, immediately
- // declare the load "committed" by updating the current entry.
- // TODO(japhet): This is a historical quirk, because same-document
- // history navigations call UpdateForCommit() with commit type
- // HistoryInertCommit. If that is fixed, we can remove this block.
- previous_entry_.reset(current_entry_.release());
- current_entry_.reset(provisional_entry_.release());
}
for (size_t i = 0; i < same_document_loads.size(); ++i) {
@@ -160,7 +152,6 @@ void HistoryController::UpdateForCommit(RenderFrameImpl* frame,
if (commit_type == blink::WebBackForwardCommit) {
if (!provisional_entry_)
return;
- previous_entry_.reset(current_entry_.release());
current_entry_.reset(provisional_entry_.release());
} else if (commit_type == blink::WebStandardCommit) {
CreateNewBackForwardItem(frame, item, navigation_within_page);
@@ -173,10 +164,6 @@ HistoryEntry* HistoryController::GetCurrentEntry() {
return current_entry_.get();
}
-HistoryEntry* HistoryController::GetPreviousEntry() {
- return previous_entry_.get();
-}
-
WebHistoryItem HistoryController::GetItemForNewChildFrame(
RenderFrameImpl* frame) const {
if (!current_entry_)
@@ -200,8 +187,7 @@ void HistoryController::CreateNewBackForwardItem(
current_entry_.reset(
new HistoryEntry(new_item, target_frame->GetRoutingID()));
} else {
- previous_entry_.reset(current_entry_.release());
- current_entry_.reset(previous_entry_->CloneAndReplace(
+ current_entry_.reset(current_entry_->CloneAndReplace(
new_item, clone_children_of_target, target_frame, render_view_));
}
}
« no previous file with comments | « content/renderer/history_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698