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

Unified Diff: content/browser/frame_host/render_view_host_manager.h

Issue 57433010: Prevent creating a swapped out RVH in the same SiteInstance as the current one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 7 years, 1 month 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
Index: content/browser/frame_host/render_view_host_manager.h
diff --git a/content/browser/frame_host/render_view_host_manager.h b/content/browser/frame_host/render_view_host_manager.h
index 377758f882843a67510a74187f12c1a07910826e..215626dd3456a45fcab8da1f43dddecd30c3b18a 100644
--- a/content/browser/frame_host/render_view_host_manager.h
+++ b/content/browser/frame_host/render_view_host_manager.h
@@ -299,6 +299,7 @@ class CONTENT_EXPORT RenderViewHostManager
// RenderProcessHosts) even if the site instance would otherwise be the same.
// As part of this, we'll also force new SiteInstances and BrowsingInstances.
// Either of the entries may be NULL.
+ // TODO(creis): Rename to ShouldSwapBrowsingInstancesForNavigation.
bool ShouldSwapProcessesForNavigation(
const NavigationEntry* curr_entry,
const NavigationEntryImpl* new_entry) const;
@@ -308,11 +309,12 @@ class CONTENT_EXPORT RenderViewHostManager
const NavigationEntryImpl* new_entry) const;
// Returns an appropriate SiteInstance object for the given NavigationEntry,
- // possibly reusing the current SiteInstance.
- // Never called if --process-per-tab is used.
+ // possibly reusing the current SiteInstance. If --process-per-tab is used,
+ // this is only called when ShouldSwapProcessesForNavigation returns true.
SiteInstance* GetSiteInstanceForEntry(
const NavigationEntryImpl& entry,
- SiteInstance* curr_instance);
+ SiteInstance* curr_instance,
+ bool force_browsing_instance_swap);
// Sets up the necessary state for a new RenderViewHost with the given opener.
bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id);

Powered by Google App Engine
This is Rietveld 408576698