Index: content/browser/frame_host/render_frame_host_manager.cc |
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
index b9328a40b2539c35bda23a47ff0299f2e67c4949..8d7887e30e462693d7e55097a3a6ebbec9cd3b2b 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -720,9 +720,16 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation( |
// The appropriate RenderFrameHost to commit the navigation. |
RenderFrameHostImpl* navigation_rfh = nullptr; |
- // TODO(carlosk): do not swap processes for renderer initiated navigations |
- // (see crbug.com/440266). |
+ // Renderer-initiated navigations that may require a SiteInstance swap are |
+ // sent to the browser via the OpenURL IPC, and are afterwards treated as |
nasko
2015/03/16 16:22:42
nit: No need for comma before "and".
carlosk
2015/03/16 17:25:00
Done.
|
+ // browser-initiated navigations. The only NavigationRequests marked as |
nasko
2015/03/16 16:22:42
nit: s/The only//
carlosk
2015/03/16 17:25:00
Done.
|
+ // renderer-initiated are created by receiving a BeginNavigation IPC, and will |
+ // then proceed in the same renderer that sent the IPC due to the condition |
+ // below. |
+ // TODO(carlosk): Once there is support for cross-process scripting check for |
+ // non-browser-initiated navigations should be removed (see crbug.com/440266). |
if (current_site_instance == dest_site_instance.get() || |
+ !request.browser_initiated() || |
(!frame_tree_node_->IsMainFrame() && |
!base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kSitePerProcess))) { |