Chromium Code Reviews| Index: content/public/browser/render_process_host.h |
| diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h |
| index 7f5e3b7e7a60e024b9788b8bacb4d0e5ab0afc12..79707adca8ea80525d10ee434a43efadd58b523a 100644 |
| --- a/content/public/browser/render_process_host.h |
| +++ b/content/public/browser/render_process_host.h |
| @@ -231,6 +231,32 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| static RenderProcessHost* GetExistingProcessHost( |
| content::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(content::BrowserContext* browser_context, |
|
jam
2012/06/28 00:12:52
these functions appear to be only used in content,
Charlie Reis
2012/06/28 00:49:15
Done.
|
| + 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( |
| + content::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( |
| + content::BrowserContext* browser_context, |
| + RenderProcessHost* process, |
| + const GURL& url); |
| + |
| // Overrides the default heuristic for limiting the max renderer process |
| // count. This is useful for unit testing process limit behaviors. It is |
| // also used to allow a command line parameter to configure the max number of |