Index: content/browser/tab_contents/navigation_controller.cc |
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc |
index e29ecc31ded29d91e7b56219710a56d94a821cfe..b9dd8dab0b1694c5ad2d3dd34535f43361a44f27 100644 |
--- a/content/browser/tab_contents/navigation_controller.cc |
+++ b/content/browser/tab_contents/navigation_controller.cc |
@@ -342,6 +342,11 @@ void NavigationController::GoBack() { |
// Base the navigation on where we are now... |
int current_index = GetCurrentEntryIndex(); |
+ LOG(ERROR) << "GoBack"; |
+ for (int i = 0; i < current_index; ++i) { |
+ LOG(ERROR) << entries_[i]->url().spec(); |
+ } |
+ |
DiscardNonCommittedEntries(); |
pending_entry_index_ = current_index - 1; |
@@ -616,7 +621,7 @@ NavigationType::Type NavigationController::ClassifyNavigation( |
// The page was not found. It could have been pruned because of the limit on |
// back/forward entries (not likely since we'll usually tell it to navigate |
// to such entries). It could also mean that the renderer is smoking crack. |
- NOTREACHED(); |
+ //NOTREACHED(); |
// Because the unknown entry has committed, we risk showing the wrong URL in |
// release builds. Instead, we'll kill the renderer process to be safe. |
@@ -676,9 +681,12 @@ bool NavigationController::IsRedirect( |
void NavigationController::RendererDidNavigateToNewPage( |
const ViewHostMsg_FrameNavigate_Params& params, bool* did_replace_entry) { |
+ LOG(ERROR) << "RendererDidNavigateToNewPage." |
+ << " url=" << params.url; |
NavigationEntry* new_entry; |
bool update_virtual_url; |
if (pending_entry_) { |
+ LOG(ERROR) << "Pending Entry exists"; |
// TODO(brettw) this assumes that the pending entry is appropriate for the |
// new page that was just loaded. I don't think this is necessarily the |
// case! We should have some more tracking to know for sure. |
@@ -712,6 +720,8 @@ void NavigationController::RendererDidNavigateToNewPage( |
void NavigationController::RendererDidNavigateToExistingPage( |
const ViewHostMsg_FrameNavigate_Params& params) { |
+ LOG(ERROR) << "RendererDidNavigateToExistingPage." |
+ << " url=" << params.url; |
// We should only get here for main frame navigations. |
DCHECK(PageTransition::IsMainFrame(params.transition)); |
@@ -931,6 +941,11 @@ void NavigationController::CopyStateFromAndPrune(NavigationController* source, |
if (last_committed_entry_index_ != -1) |
last_committed_entry_index_--; |
} |
+ |
+ LOG(ERROR) << "OffsetAndPrune." |
+ << " last_committed_entry_index_=" << last_committed_entry_index_; |
+ // Send a message to active render view asking to offset messages. |
+ tab_contents_->OffsetAndPruneHistory(entry_count() - 1); |
} |
void NavigationController::PruneAllButActive() { |