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 6610cb1202c04ab2360021ba4a1df4f4aba3f4ea..d49c1feffc859a6ddffe0329ebb9e4eeba1030a8 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl.cc |
| @@ -906,8 +906,15 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( |
| // (see http://crbug.com/236848). For now, we assume this means the |
| // child frame loaded and proceed. Note that this may do the wrong thing |
| // for cross-process AUTO_SUBFRAME navigations. |
|
Avi (use Gerrit)
2015/03/12 20:40:28
This comment seems out-of-date with this change.
Nate Chapin
2015/03/12 20:51:12
Removed.
|
| - if (rfh->IsCrossProcessSubframe()) |
| - return NAVIGATION_TYPE_NEW_SUBFRAME; |
| + if (rfh->IsCrossProcessSubframe()) { |
| + CHECK(!ui::PageTransitionIsMainFrame(params.transition)); |
| + if (ui::PageTransitionCoreTypeIs(params.transition, |
| + ui::PAGE_TRANSITION_MANUAL_SUBFRAME)) { |
| + return NAVIGATION_TYPE_NEW_SUBFRAME; |
| + } else { |
| + return NAVIGATION_TYPE_AUTO_SUBFRAME; |
| + } |
| + } |
| // The renderer generates the page IDs, and so if it gives us the invalid |
| // page ID (-1) we know it didn't actually navigate. This happens in a few |
| @@ -1243,13 +1250,6 @@ void NavigationControllerImpl::RendererDidNavigateNewSubframe( |
| // the handling of immediate redirects. TODO(avi): Is this still valid? I'm |
| // pretty sure that's there's nothing left of that code and that we should |
| // take this out. |
| - // |
| - // Except for cross-process iframes; this doesn't work yet for them. |
| - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kSitePerProcess)) { |
| - NOTREACHED(); |
| - } |
| - |
| DiscardNonCommittedEntriesInternal(); |
| return; |
|
Avi (use Gerrit)
2015/03/12 20:40:28
This is the wrong fix; this would always ignore a
Nate Chapin
2015/03/12 20:51:12
Done.
|
| } |