Chromium Code Reviews| Index: content/browser/frame_host/navigation_controller_impl.cc |
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
| index 6d1c597d7604629df1b636ed8947c099fbc40c5c..379de683e15d0599189bf7dbd1fb1b0013d9a65d 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl.cc |
| @@ -107,21 +107,9 @@ void ConfigureEntriesForRestore( |
| // See NavigationController::IsURLInPageNavigation for how this works and why. |
|
nasko
2014/06/06 17:21:56
nit: I'll put the reasoning from the CL descriptio
|
| bool AreURLsInPageNavigation(const GURL& existing_url, |
| const GURL& new_url, |
| - bool renderer_says_in_page, |
| - NavigationType navigation_type) { |
| - if (existing_url.GetOrigin() == new_url.GetOrigin()) |
| - return renderer_says_in_page; |
| - |
| - if (!new_url.has_ref()) { |
| - // When going back from the ref URL to the non ref one the navigation type |
| - // is IN_PAGE. |
| - return navigation_type == NAVIGATION_TYPE_IN_PAGE; |
| - } |
| - |
| - url::Replacements<char> replacements; |
| - replacements.ClearRef(); |
| - return existing_url.ReplaceComponents(replacements) == |
| - new_url.ReplaceComponents(replacements); |
| + bool renderer_says_in_page) { |
| + return existing_url.GetOrigin() == new_url.GetOrigin() && |
| + renderer_says_in_page; |
| } |
| // Determines whether or not we should be carrying over a user agent override |
| @@ -986,8 +974,7 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( |
| // navigations that don't actually navigate, but it can happen when there is |
| // an encoding override (it always sends a navigation request). |
| if (AreURLsInPageNavigation(existing_entry->GetURL(), params.url, |
| - params.was_within_same_page, |
| - NAVIGATION_TYPE_UNKNOWN)) { |
| + params.was_within_same_page)) { |
| return NAVIGATION_TYPE_IN_PAGE; |
| } |
| @@ -1256,7 +1243,7 @@ bool NavigationControllerImpl::IsURLInPageNavigation( |
| NavigationType navigation_type) const { |
| NavigationEntry* last_committed = GetLastCommittedEntry(); |
| return last_committed && AreURLsInPageNavigation( |
| - last_committed->GetURL(), url, renderer_says_in_page, navigation_type); |
| + last_committed->GetURL(), url, renderer_says_in_page); |
| } |
| void NavigationControllerImpl::CopyStateFrom( |