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 96900941e917bf964a13293930b129bb36f9ab78..3661bd5ccb91784cbee7718d9d8e6ed60c6c268f 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.h |
+++ b/content/browser/renderer_host/render_process_host_impl.h |
@@ -114,9 +114,11 @@ class CONTENT_EXPORT RenderProcessHostImpl |
public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider), |
public NON_EXPORTED_BASE(mojom::RendererHost) { |
public: |
- RenderProcessHostImpl(BrowserContext* browser_context, |
- StoragePartitionImpl* storage_partition_impl, |
- bool is_for_guests_only); |
+ static RenderProcessHost* CreateRenderProcessHost( |
Charlie Reis
2017/06/28 22:31:35
Let's include a comment here suggesting that calle
mattcary
2017/06/29 12:57:09
Done, along with the addition of the alternative c
|
+ BrowserContext* browser_context, |
+ StoragePartitionImpl* storage_partition_impl, |
+ bool is_for_guests_only); |
+ |
~RenderProcessHostImpl() override; |
// RenderProcessHost implementation (public portion). |
@@ -335,6 +337,14 @@ class CONTENT_EXPORT RenderProcessHostImpl |
RenderProcessHost* render_process_host, |
const GURL& site_url); |
+ // This should be called when a storage partition is shutdown and will cleanup |
+ // any RenderProcessHosts associated with the partition. |
+ static void OnStoragePartitionShutdown(StoragePartition* partition); |
+ |
+ // Return the spare RenderProcessHost, if it exists. There is at most one |
+ // globally-used spare RenderProcessHost at any time. |
+ static RenderProcessHost* GetSpareRenderProcessHostForTesting(); |
+ |
protected: |
// A proxy for our IPC::Channel that lives on the IO thread. |
std::unique_ptr<IPC::ChannelProxy> channel_; |
@@ -361,6 +371,12 @@ class CONTENT_EXPORT RenderProcessHostImpl |
class ConnectionFilterController; |
class ConnectionFilterImpl; |
+ // Use CreateRenderProcessHost() instead of calling this constructor |
+ // directly. |
+ RenderProcessHostImpl(BrowserContext* browser_context, |
+ StoragePartitionImpl* storage_partition_impl, |
+ bool is_for_guests_only); |
+ |
// Initializes a new IPC::ChannelProxy in |channel_|, which will be connected |
// to the next child process launched for this host, if any. |
void InitializeChannelProxy(); |