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

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: Another chromium.fyi.json conflict 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)) {
1578 CHECK(!dest_url.SchemeIs(url::kHttpScheme) &&
1579 !dest_url.SchemeIs(url::kHttpsScheme));
1580 return false;
1581 }
1582
1575 BrowserContext* context = rfh->GetSiteInstance()->GetBrowserContext(); 1583 BrowserContext* context = rfh->GetSiteInstance()->GetBrowserContext();
1576 GURL effective_url = SiteInstanceImpl::GetEffectiveURL(context, dest_url); 1584 GURL effective_url = SiteInstanceImpl::GetEffectiveURL(context, dest_url);
1577 1585
1578 // TODO(nasko, nick): These following --site-per-process checks are 1586 // TODO(nasko, nick): These following --site-per-process checks are
1579 // overly simplistic. Update them to match all the cases 1587 // overly simplistic. Update them to match all the cases
1580 // considered by DetermineSiteInstanceForURL. 1588 // considered by DetermineSiteInstanceForURL.
1581 if (SiteInstance::IsSameWebSite(rfh->GetSiteInstance()->GetBrowserContext(), 1589 if (SiteInstance::IsSameWebSite(rfh->GetSiteInstance()->GetBrowserContext(),
1582 rfh->GetSiteInstance()->GetSiteURL(), 1590 rfh->GetSiteInstance()->GetSiteURL(),
1583 dest_url)) { 1591 dest_url)) {
1584 return false; // The same site, no transition needed. 1592 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) { 2655 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2648 if (!frame_tree_node_->opener()) 2656 if (!frame_tree_node_->opener())
2649 return MSG_ROUTING_NONE; 2657 return MSG_ROUTING_NONE;
2650 2658
2651 return frame_tree_node_->opener() 2659 return frame_tree_node_->opener()
2652 ->render_manager() 2660 ->render_manager()
2653 ->GetRoutingIdForSiteInstance(instance); 2661 ->GetRoutingIdForSiteInstance(instance);
2654 } 2662 }
2655 2663
2656 } // namespace content 2664 } // 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