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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 10575014: Move process-per-site logic from BrowsingInstance to RenderProcessHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comment. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index d16181fc16641ad89466a9564e9354496c09c283..4f1cda80d274920cbc735c9e5dadb00f9b8be940 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -132,6 +132,32 @@ class CONTENT_EXPORT RenderProcessHostImpl
BrowserContext* browser_context,
const GURL& site_url);
+ // Returns whether the process-per-site model is in use (globally or just for
+ // the current site), in which case we should ensure there is only one
+ // RenderProcessHost per site for the entire browser context.
+ static bool ShouldUseProcessPerSite(BrowserContext* browser_context,
+ const GURL& url);
+
+ // Returns an existing RenderProcessHost for |url| in |browser_context|,
+ // if one exists. Otherwise a new RenderProcessHost should be created and
+ // registered using RegisterProcessHostForSite().
+ // This should only be used for process-per-site mode, which can be enabled
+ // globally with a command line flag or per-site, as determined by
+ // SiteInstanceImpl::ShouldUseProcessPerSite.
+ static RenderProcessHost* GetProcessHostForSite(
+ BrowserContext* browser_context,
+ const GURL& url);
+
+ // Registers the given |process| to be used for any instance of |url|
+ // within |browser_context|.
+ // This should only be used for process-per-site mode, which can be enabled
+ // globally with a command line flag or per-site, as determined by
+ // SiteInstanceImpl::ShouldUseProcessPerSite.
+ static void RegisterProcessHostForSite(
+ BrowserContext* browser_context,
+ RenderProcessHost* process,
+ const GURL& url);
+
protected:
// A proxy for our IPC::Channel that lives on the IO thread (see
// browser_process.h)
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698