Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1491043002: Don't swap processes for frames embedded in DevTools pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 const GURL& dest_url) { 1565 const GURL& dest_url) {
1566 // A transfer is not needed if the current SiteInstance doesn't yet have a 1566 // A transfer is not needed if the current SiteInstance doesn't yet have a
1567 // site. This is the case for tests that use NavigateToURL. 1567 // site. This is the case for tests that use NavigateToURL.
1568 if (!rfh->GetSiteInstance()->HasSite()) 1568 if (!rfh->GetSiteInstance()->HasSite())
1569 return false; 1569 return false;
1570 1570
1571 // We do not currently swap processes for navigations in webview tag guests. 1571 // We do not currently swap processes for navigations in webview tag guests.
1572 if (rfh->GetSiteInstance()->GetSiteURL().SchemeIs(kGuestScheme)) 1572 if (rfh->GetSiteInstance()->GetSiteURL().SchemeIs(kGuestScheme))
1573 return false; 1573 return false;
1574 1574
1575 // Don't swap processes for extensions embedded in DevTools. See
1576 // https://crbug.com/564216.
1577 if (rfh->GetSiteInstance()->GetSiteURL().SchemeIs(kChromeDevToolsScheme))
Charlie Reis 2015/12/02 19:56:07 Maybe we can add a CHECK that the dest_url's schem
alexmos 2015/12/02 22:44:17 Done. Good idea!
1578 return false;
1579
1575 BrowserContext* context = rfh->GetSiteInstance()->GetBrowserContext(); 1580 BrowserContext* context = rfh->GetSiteInstance()->GetBrowserContext();
1576 GURL effective_url = SiteInstanceImpl::GetEffectiveURL(context, dest_url); 1581 GURL effective_url = SiteInstanceImpl::GetEffectiveURL(context, dest_url);
1577 1582
1578 // TODO(nasko, nick): These following --site-per-process checks are 1583 // TODO(nasko, nick): These following --site-per-process checks are
1579 // overly simplistic. Update them to match all the cases 1584 // overly simplistic. Update them to match all the cases
1580 // considered by DetermineSiteInstanceForURL. 1585 // considered by DetermineSiteInstanceForURL.
1581 if (SiteInstance::IsSameWebSite(rfh->GetSiteInstance()->GetBrowserContext(), 1586 if (SiteInstance::IsSameWebSite(rfh->GetSiteInstance()->GetBrowserContext(),
1582 rfh->GetSiteInstance()->GetSiteURL(), 1587 rfh->GetSiteInstance()->GetSiteURL(),
1583 dest_url)) { 1588 dest_url)) {
1584 return false; // The same site, no transition needed. 1589 return false; // The same site, no transition needed.
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { 2652 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2648 if (!frame_tree_node_->opener()) 2653 if (!frame_tree_node_->opener())
2649 return MSG_ROUTING_NONE; 2654 return MSG_ROUTING_NONE;
2650 2655
2651 return frame_tree_node_->opener() 2656 return frame_tree_node_->opener()
2652 ->render_manager() 2657 ->render_manager()
2653 ->GetRoutingIdForSiteInstance(instance); 2658 ->GetRoutingIdForSiteInstance(instance);
2654 } 2659 }
2655 2660
2656 } // namespace content 2661 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698