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

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

Issue 1944013003: Move ownership of source SiteInstance to the FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of review comments addressed. Created 4 years, 7 months 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 | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 RenderFrameHostImpl* RenderFrameHostManager::Navigate( 199 RenderFrameHostImpl* RenderFrameHostManager::Navigate(
200 const GURL& dest_url, 200 const GURL& dest_url,
201 const FrameNavigationEntry& frame_entry, 201 const FrameNavigationEntry& frame_entry,
202 const NavigationEntryImpl& entry) { 202 const NavigationEntryImpl& entry) {
203 TRACE_EVENT1("navigation", "RenderFrameHostManager:Navigate", 203 TRACE_EVENT1("navigation", "RenderFrameHostManager:Navigate",
204 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id()); 204 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id());
205 // Create a pending RenderFrameHost to use for the navigation. 205 // Create a pending RenderFrameHost to use for the navigation.
206 RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate( 206 RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate(
207 dest_url, 207 dest_url, frame_entry.source_site_instance(), frame_entry.site_instance(),
208 // TODO(creis): Move source_site_instance to FNE.
209 entry.source_site_instance(), frame_entry.site_instance(),
210 entry.GetTransitionType(), 208 entry.GetTransitionType(),
211 entry.restore_type() != NavigationEntryImpl::RESTORE_NONE, 209 entry.restore_type() != NavigationEntryImpl::RESTORE_NONE,
212 entry.IsViewSourceMode(), entry.transferred_global_request_id(), 210 entry.IsViewSourceMode(), entry.transferred_global_request_id(),
213 entry.bindings()); 211 entry.bindings());
214 if (!dest_render_frame_host) 212 if (!dest_render_frame_host)
215 return nullptr; // We weren't able to create a pending render frame host. 213 return nullptr; // We weren't able to create a pending render frame host.
216 214
217 // If the current render_frame_host_ isn't live, we should create it so 215 // If the current render_frame_host_ isn't live, we should create it so
218 // that we don't show a sad tab while the dest_render_frame_host fetches 216 // that we don't show a sad tab while the dest_render_frame_host fetches
219 // its first page. (Bug 1145340) 217 // its first page. (Bug 1145340)
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2547 resolved_url)) { 2545 resolved_url)) {
2548 DCHECK(!dest_instance || 2546 DCHECK(!dest_instance ||
2549 dest_instance == render_frame_host_->GetSiteInstance()); 2547 dest_instance == render_frame_host_->GetSiteInstance());
2550 return false; 2548 return false;
2551 } 2549 }
2552 2550
2553 return true; 2551 return true;
2554 } 2552 }
2555 2553
2556 } // namespace content 2554 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698