Index: components/arc/arc_bridge_bootstrap.h |
diff --git a/components/arc/arc_bridge_bootstrap.h b/components/arc/arc_bridge_bootstrap.h |
index a86c97420af27a55cbd9e46d6921dfcd334a42f8..45e7b174931b09fdc885a0f56e5df6e6f8d640c2 100644 |
--- a/components/arc/arc_bridge_bootstrap.h |
+++ b/components/arc/arc_bridge_bootstrap.h |
@@ -7,12 +7,20 @@ |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/process/process_handle.h" |
#include "base/sequenced_task_runner.h" |
#include "base/single_thread_task_runner.h" |
#include "components/arc/common/arc_bridge.mojom.h" |
namespace arc { |
+// Child process may be created in the different namespace, thus we don't have |
+// its real PID. Since Mojo in POSIX only uses the value as identifier for the |
+// routing table, we can give it fake value as long as it is unique. |
+// Chrome OS uses default pid_max of 32k, so we can safely shift the pid range |
+// by kPidBase and don't conflict with legitimate process. |
+base::ProcessHandle RemapChildPid(uint32_t pid); |
+ |
// Starts the ARC instance and bootstraps the bridge connection. |
// Clients should implement the Delegate to be notified upon communications |
// being available. |