Index: content/renderer/history_controller.cc |
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc |
index d6f1abdf5e378a12fc29cb8c1ff5cf65e4009db9..44454ab33fd3c0514fb7c8e0fa450171f71d5f7e 100644 |
--- a/content/renderer/history_controller.cc |
+++ b/content/renderer/history_controller.cc |
@@ -53,79 +53,6 @@ HistoryController::HistoryController(RenderViewImpl* render_view) |
HistoryController::~HistoryController() { |
} |
-void HistoryController::GoToEntry(scoped_ptr<HistoryEntry> target_entry, |
- WebURLRequest::CachePolicy cache_policy) { |
- HistoryFrameLoadVector same_document_loads; |
- HistoryFrameLoadVector different_document_loads; |
- |
- provisional_entry_ = target_entry.Pass(); |
- |
- WebFrame* main_frame = render_view_->GetMainRenderFrame()->GetWebFrame(); |
- if (current_entry_) { |
- RecursiveGoToEntry( |
- main_frame, same_document_loads, different_document_loads); |
- } |
- |
- if (same_document_loads.empty() && different_document_loads.empty()) { |
- // If we don't have any frames to navigate at this point, either |
- // (1) there is no previous history entry to compare against, or |
- // (2) we were unable to match any frames by name. In the first case, |
- // doing a different document navigation to the root item is the only valid |
- // thing to do. In the second case, we should have been able to find a |
- // frame to navigate based on names if this were a same document |
- // 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())); |
- } |
- |
- for (size_t i = 0; i < same_document_loads.size(); ++i) { |
- WebFrame* frame = same_document_loads[i].first; |
- if (!RenderFrameImpl::FromWebFrame(frame)) |
- continue; |
- frame->loadHistoryItem(same_document_loads[i].second, |
- blink::WebHistorySameDocumentLoad, |
- cache_policy); |
- } |
- for (size_t i = 0; i < different_document_loads.size(); ++i) { |
- WebFrame* frame = different_document_loads[i].first; |
- if (!RenderFrameImpl::FromWebFrame(frame)) |
- continue; |
- frame->loadHistoryItem(different_document_loads[i].second, |
- blink::WebHistoryDifferentDocumentLoad, |
- cache_policy); |
- } |
-} |
- |
-void HistoryController::RecursiveGoToEntry( |
- WebFrame* frame, |
- HistoryFrameLoadVector& same_document_loads, |
- HistoryFrameLoadVector& different_document_loads) { |
- DCHECK(provisional_entry_); |
- DCHECK(current_entry_); |
- RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame); |
- const WebHistoryItem& new_item = |
- provisional_entry_->GetItemForFrame(render_frame); |
- const WebHistoryItem& old_item = |
- current_entry_->GetItemForFrame(render_frame); |
- if (new_item.isNull()) |
- return; |
- |
- if (old_item.isNull() || |
- new_item.itemSequenceNumber() != old_item.itemSequenceNumber()) { |
- if (!old_item.isNull() && |
- new_item.documentSequenceNumber() == old_item.documentSequenceNumber()) |
- same_document_loads.push_back(std::make_pair(frame, new_item)); |
- else |
- different_document_loads.push_back(std::make_pair(frame, new_item)); |
- return; |
- } |
- |
- for (WebFrame* child = frame->firstChild(); child; |
- child = child->nextSibling()) { |
- RecursiveGoToEntry(child, same_document_loads, different_document_loads); |
- } |
-} |
- |
void HistoryController::UpdateForInitialLoadInChildFrame( |
RenderFrameImpl* frame, |
const WebHistoryItem& item) { |