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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 1540463002: Remove old GetRenderManager call from NavigatorImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index e400ecf3b7f1f92ca1c93e10544d4e846c16d4d9..5b59d29ff0e692f063ee194e1aa1f16182a64948 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -72,13 +72,6 @@ FrameMsg_Navigate_Type::Value GetNavigationType(
return FrameMsg_Navigate_Type::NORMAL;
}
-RenderFrameHostManager* GetRenderManager(RenderFrameHostImpl* rfh) {
- if (SiteIsolationPolicy::AreCrossProcessFramesPossible())
- return rfh->frame_tree_node()->render_manager();
-
- return rfh->frame_tree_node()->frame_tree()->root()->render_manager();
-}
-
} // namespace
struct NavigatorImpl::NavigationMetricsData {
@@ -562,12 +555,16 @@ void NavigatorImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host,
WindowOpenDisposition disposition,
bool should_replace_current_entry,
bool user_gesture) {
- SiteInstance* current_site_instance =
- GetRenderManager(render_frame_host)->current_frame_host()->
- GetSiteInstance();
+ // This call only makes sense for subframes if OOPIFs are possible.
+ DCHECK(!render_frame_host->GetParent() ||
+ SiteIsolationPolicy::AreCrossProcessFramesPossible());
+
// If this came from a swapped out RenderFrameHost, we only allow the request
// if we are still in the same BrowsingInstance.
// TODO(creis): Move this to RenderFrameProxyHost::OpenURL.
+ SiteInstance* current_site_instance = render_frame_host->frame_tree_node()
+ ->current_frame_host()
+ ->GetSiteInstance();
if (render_frame_host->is_swapped_out() &&
!render_frame_host->GetSiteInstance()->IsRelatedSiteInstance(
current_site_instance)) {
@@ -640,6 +637,10 @@ void NavigatorImpl::RequestTransferURL(
WindowOpenDisposition disposition,
const GlobalRequestID& transferred_global_request_id,
bool should_replace_current_entry) {
+ // This call only makes sense for subframes if OOPIFs are possible.
+ DCHECK(!render_frame_host->GetParent() ||
+ SiteIsolationPolicy::AreCrossProcessFramesPossible());
+
// Allow the delegate to cancel the transfer.
if (!delegate_->ShouldTransferNavigation())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698