| Index: content/browser/mach_broker_mac.h
|
| diff --git a/content/browser/mach_broker_mac.h b/content/browser/mach_broker_mac.h
|
| index 9088ca70265491cc76ae9826c6ecc05c99fa4832..369a331f8191a818e77697db43c3a23329eeeab4 100644
|
| --- a/content/browser/mach_broker_mac.h
|
| +++ b/content/browser/mach_broker_mac.h
|
| @@ -5,11 +5,11 @@
|
| #ifndef CONTENT_BROWSER_MACH_BROKER_MAC_H_
|
| #define CONTENT_BROWSER_MACH_BROKER_MAC_H_
|
|
|
| +#include <mach/mach.h>
|
| +
|
| #include <map>
|
| #include <string>
|
|
|
| -#include <mach/mach.h>
|
| -
|
| #include "base/memory/singleton.h"
|
| #include "base/process/process_handle.h"
|
| #include "base/process/process_metrics.h"
|
| @@ -61,7 +61,7 @@ class CONTENT_EXPORT MachBroker : public base::ProcessMetrics::PortProvider,
|
| // Callers are expected to later update the port with FinalizePid(). Callers
|
| // MUST acquire the lock given by GetLock() before calling this method (and
|
| // release the lock afterwards).
|
| - void AddPlaceholderForPid(base::ProcessHandle pid);
|
| + void AddPlaceholderForPid(base::ProcessHandle pid, int child_process_id);
|
|
|
| // Implement |ProcessMetrics::PortProvider|.
|
| mach_port_t TaskForPid(base::ProcessHandle process) const override;
|
| @@ -92,6 +92,8 @@ class CONTENT_EXPORT MachBroker : public base::ProcessMetrics::PortProvider,
|
|
|
| // Removes all mappings belonging to |pid| from the broker.
|
| void InvalidatePid(base::ProcessHandle pid);
|
| + // Removes all mappings belonging to |child_process_id| from the broker.
|
| + void InvalidateChildProcessId(int child_process_id);
|
|
|
| // Returns the Mach port name to use when sending or receiving messages.
|
| // Does the Right Thing in the browser and in child processes.
|
| @@ -110,6 +112,10 @@ class CONTENT_EXPORT MachBroker : public base::ProcessMetrics::PortProvider,
|
| typedef std::map<base::ProcessHandle, mach_port_t> MachMap;
|
| MachMap mach_map_;
|
|
|
| + // Stores the Child process unique id (RenderProcessHost ID) for every process
|
| + typedef std::map<base::ProcessHandle, int> ChildProcessIdMap;
|
| + ChildProcessIdMap child_process_id_map_;
|
| +
|
| // Mutex that guards |mach_map_|.
|
| mutable base::Lock lock_;
|
|
|
|
|