Index: content/common/child_process_host.h |
=================================================================== |
--- content/common/child_process_host.h (revision 112500) |
+++ content/common/child_process_host.h (working copy) |
@@ -91,6 +91,19 @@ |
uint32 buffer_size, base::ProcessHandle child_process, |
base::SharedMemoryHandle* handle); |
+ // Generates a unique channel name for a child process. |
+ // The "instance" pointer value is baked into the channel id. |
+ static std::string GenerateRandomChannelID(void* instance); |
+ |
+ // Returns a unique ID to identify a child process. On construction, this |
+ // function will be used to generate the id_, but it is also used to generate |
+ // IDs for the RenderProcessHost, which doesn't inherit from us, and whose IDs |
+ // must be unique for all child processes. |
+ // |
+ // This function is threadsafe since RenderProcessHost is on the UI thread, |
+ // but normally this will be used on the IO thread. |
+ static int GenerateChildProcessUniqueId(); |
+ |
protected: |
ChildProcessHost(); |