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

Unified Diff: content/zygote/zygote_main_linux.cc

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/zygote/zygote_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_main_linux.cc
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 3ae08e54b397f0293da2e71c908f9aad4c6859da..567b3055ccc4dbb9938db0fe0733ee217b76b9b7 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -24,6 +24,7 @@
#include "base/rand_util.h"
#include "base/sys_info.h"
#include "build/build_config.h"
+#include "content/common/child_process_sandbox_support_impl_linux.h"
#include "content/common/font_config_ipc_linux.h"
#include "content/common/pepper_plugin_list.h"
#include "content/common/sandbox_linux.h"
@@ -66,7 +67,7 @@ static void ProxyLocaltimeCallToBrowser(time_t input, struct tm* output,
uint8_t reply_buf[512];
const ssize_t r = UnixDomainSocket::SendRecvMsg(
- Zygote::kMagicSandboxIPCDescriptor, reply_buf, sizeof(reply_buf), NULL,
+ GetSandboxFD(), reply_buf, sizeof(reply_buf), NULL,
request);
if (r == -1) {
memset(output, 0, sizeof(struct tm));
@@ -302,7 +303,7 @@ static void PreSandboxInit() {
InitializeWebRtcModule();
#endif
SkFontConfigInterface::SetGlobal(
- new FontConfigIPC(Zygote::kMagicSandboxIPCDescriptor))->unref();
+ new FontConfigIPC(GetSandboxFD()))->unref();
}
// Do nothing here
@@ -468,7 +469,7 @@ bool ZygoteMain(const MainFunctionParams& params,
if (forkdelegate != NULL) {
VLOG(1) << "ZygoteMain: initializing fork delegate";
- forkdelegate->Init(Zygote::kMagicSandboxIPCDescriptor);
+ forkdelegate->Init(GetSandboxFD());
} else {
VLOG(1) << "ZygoteMain: fork delegate is NULL";
}
« no previous file with comments | « content/zygote/zygote_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698