Chromium Code Reviews| Index: content/browser/web_contents/navigation_controller_impl.cc |
| diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc |
| index c3e9140b48ff6f23c8b72a0d7b274dccff3c62fe..5acfa35e41a16e321bab482e043729b4b0309d1f 100644 |
| --- a/content/browser/web_contents/navigation_controller_impl.cc |
| +++ b/content/browser/web_contents/navigation_controller_impl.cc |
| @@ -269,7 +269,7 @@ void NavigationControllerImpl::ReloadInternal(bool check_for_repost, |
| // If an interstitial is showing, treat a reload as a navigation to the |
| // transient entry's URL. |
| NavigationEntryImpl* active_entry = |
|
Charlie Reis
2013/08/16 22:10:14
nit: visible_entry
Actually, should we just make
nasko
2013/09/12 17:56:31
Done.
|
| - NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); |
| + NavigationEntryImpl::FromNavigationEntry(GetVisibleEntry()); |
| if (!active_entry) |
| return; |
| LoadURL(active_entry->GetURL(), |
| @@ -462,7 +462,7 @@ bool NavigationControllerImpl::CanViewSource() const { |
| const std::string& mime_type = web_contents_->GetContentsMimeType(); |
| bool is_viewable_mime_type = net::IsSupportedNonImageMimeType(mime_type) && |
| !net::IsSupportedMediaMimeType(mime_type); |
| - NavigationEntry* active_entry = GetActiveEntry(); |
| + NavigationEntry* active_entry = GetVisibleEntry(); |
|
Charlie Reis
2013/08/16 22:10:14
nit: visible_entry
nasko
2013/09/12 17:56:31
Done.
|
| return active_entry && !active_entry->IsViewSourceMode() && |
| is_viewable_mime_type && !web_contents_->GetInterstitialPage(); |
| } |
| @@ -1318,7 +1318,7 @@ void NavigationControllerImpl::PruneAllButVisible() { |
| DCHECK_NE(-1, last_committed_entry_index_); |
| NavigationEntryImpl* entry = |
| - NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); |
| + NavigationEntryImpl::FromNavigationEntry(GetVisibleEntry()); |
|
Charlie Reis
2013/08/16 22:10:14
This scares me. We may have to come back to this
|
| // We pass 0 instead of GetEntryCount() for the history_length parameter of |
| // SetHistoryLengthAndPrune, because it will create history_length additional |
| // history entries. |
| @@ -1556,7 +1556,7 @@ void NavigationControllerImpl::NavigateToPendingEntry(ReloadType reload_type) { |
| void NavigationControllerImpl::NotifyNavigationEntryCommitted( |
| LoadCommittedDetails* details) { |
| - details->entry = GetActiveEntry(); |
| + details->entry = GetVisibleEntry(); |
|
Charlie Reis
2013/08/16 22:10:14
GetLastCommittedEntry, perhaps? How would we have
nasko
2013/09/12 17:56:31
I'm not sure we can have a transient entry at the
|
| NotificationDetails notification_details = |
| Details<LoadCommittedDetails>(details); |