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

Unified Diff: content/browser/zygote_host/zygote_host_impl_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
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index bb84e62ce3aaee5e072c9c1ad94bd7ef65e130ed..3490ff312457f067ab3803ae566ebf9fe44c44bf 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -86,7 +86,7 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
#endif
base::FileHandleMappingVector fds_to_map;
- fds_to_map.push_back(std::make_pair(fds[1], kZygoteSocketPairFd));
+ fds_to_map.push_back(std::make_pair(fds[1], kMagicZygoteDescriptor));
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) {
@@ -149,7 +149,7 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
// Start up the sandbox host process and get the file descriptor for the
// renderers to talk to it.
const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
- fds_to_map.push_back(std::make_pair(sfd, kZygoteRendererSocketFd));
+ fds_to_map.push_back(std::make_pair(sfd, kMagicSandboxIPCDescriptor));
int dummy_fd = -1;
if (using_suid_sandbox_) {

Powered by Google App Engine
This is Rietveld 408576698