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 fe5e52de8294d9c5ca53f4e0482a46a7146b36cd..d606a4def52cc0916a5073cf44f0f71d0c6f71e4 100644 |
| --- a/content/browser/web_contents/navigation_controller_impl.cc |
| +++ b/content/browser/web_contents/navigation_controller_impl.cc |
| @@ -268,14 +268,14 @@ void NavigationControllerImpl::ReloadInternal(bool check_for_repost, |
| if (transient_entry_index_ != -1) { |
| // If an interstitial is showing, treat a reload as a navigation to the |
| // transient entry's URL. |
| - NavigationEntryImpl* active_entry = |
| - NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); |
| - if (!active_entry) |
| + NavigationEntryImpl* transient_entry = |
| + NavigationEntryImpl::FromNavigationEntry(GetTransientEntry()); |
| + if (!transient_entry) |
| return; |
| - LoadURL(active_entry->GetURL(), |
| + LoadURL(transient_entry->GetURL(), |
| Referrer(), |
| PAGE_TRANSITION_RELOAD, |
| - active_entry->extra_headers()); |
| + transient_entry->extra_headers()); |
| return; |
| } |
| @@ -462,8 +462,8 @@ 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(); |
| - return active_entry && !active_entry->IsViewSourceMode() && |
| + NavigationEntry* visible_entry = GetVisibleEntry(); |
| + return visible_entry && !visible_entry->IsViewSourceMode() && |
| is_viewable_mime_type && !web_contents_->GetInterstitialPage(); |
| } |
| @@ -1319,7 +1319,7 @@ void NavigationControllerImpl::PruneAllButVisible() { |
| DCHECK_NE(-1, last_committed_entry_index_); |
| NavigationEntryImpl* entry = |
| - NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); |
| + NavigationEntryImpl::FromNavigationEntry(GetVisibleEntry()); |
|
Charlie Reis
2013/09/16 23:10:54
To be honest, I'm not sure what this is expecting.
nasko
2013/09/18 17:03:18
Done.
|
| // We pass 0 instead of GetEntryCount() for the history_length parameter of |
| // SetHistoryLengthAndPrune, because it will create history_length additional |
| // history entries. |
| @@ -1557,7 +1557,7 @@ void NavigationControllerImpl::NavigateToPendingEntry(ReloadType reload_type) { |
| void NavigationControllerImpl::NotifyNavigationEntryCommitted( |
| LoadCommittedDetails* details) { |
| - details->entry = GetActiveEntry(); |
| + details->entry = GetLastCommittedEntry(); |
| // We need to notify the ssl_manager_ before the web_contents_ so the |
| // location bar will have up-to-date information about the security style |