Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: content/common/zygote_commands_linux.h

Issue 23956010: Define magic descriptors in one place. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/zygote_host/zygote_host_impl_linux.cc ('k') | content/zygote/zygote_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/zygote_commands_linux.h
diff --git a/content/common/zygote_commands_linux.h b/content/common/zygote_commands_linux.h
index 6df1fdae2876b0fca9ab13f6d9be78bb230d9466..893fb334619a1b64ac5d27edd32118ae94b19516 100644
--- a/content/common/zygote_commands_linux.h
+++ b/content/common/zygote_commands_linux.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
#define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
+#include "base/posix/global_descriptors.h"
+#include "ipc/ipc_descriptors.h"
+
namespace content {
// Contents of the initial message sent from the zygote to the browser when it
@@ -15,8 +18,8 @@ static const char kZygoteHelloMessage[] = "ZYGOTE_OK";
const size_t kZygoteMaxMessageLength = 8192;
// File descriptors initialized by the Zygote Host
-const int kZygoteSocketPairFd = 3;
-const int kZygoteRendererSocketFd = 5;
+const int kZygoteSocketPairFd =
+ kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor;
// This file descriptor is special. It is passed to the Zygote and a setuid
// helper will be called to locate the process of the Zygote on the system.
// This mechanism is used when multiple PID namespaces exist because of the
« no previous file with comments | « content/browser/zygote_host/zygote_host_impl_linux.cc ('k') | content/zygote/zygote_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698