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

Unified Diff: content/browser/zygote_host_impl_linux.cc

Issue 10392176: Zygote: create variables for magic fd numbers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove explicit content:: scope Created 8 years, 7 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 | « no previous file | content/common/zygote_commands_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host_impl_linux.cc b/content/browser/zygote_host_impl_linux.cc
index 0bcebd98d4e1e1288ccefaee3efe8e997c44efc1..10214ec4e940c2b39696db68c011d8a83abcf37f 100644
--- a/content/browser/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host_impl_linux.cc
@@ -103,7 +103,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], 3));
+ fds_to_map.push_back(std::make_pair(fds[1], content::kZygoteSocketPairFd));
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) {
@@ -161,13 +161,14 @@ 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, 5));
+ fds_to_map.push_back(std::make_pair(sfd, content::kZygoteRendererSocketFd));
int dummy_fd = -1;
if (using_suid_sandbox_) {
dummy_fd = socket(PF_UNIX, SOCK_DGRAM, 0);
CHECK(dummy_fd >= 0);
- fds_to_map.push_back(std::make_pair(dummy_fd, 7));
+ fds_to_map.push_back(std::make_pair(dummy_fd,
+ content::kZygoteIdFd));
}
base::ProcessHandle process = -1;
« no previous file with comments | « no previous file | content/common/zygote_commands_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698