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

Unified Diff: content/public/common/zygote_fork_delegate_linux.h

Issue 24449002: NaCl: Clean up how FDs are passed to nacl_helper instances on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review - cleanup Created 7 years, 2 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 | « components/nacl/zygote/nacl_fork_delegate_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/public/common/zygote_fork_delegate_linux.h
diff --git a/content/public/common/zygote_fork_delegate_linux.h b/content/public/common/zygote_fork_delegate_linux.h
index a5ea9f2952f6eebeea745f1ec39496cc2799ee5b..87b4859c7cf469c1ea32df061b7d2d506fba6228 100644
--- a/content/public/common/zygote_fork_delegate_linux.h
+++ b/content/public/common/zygote_fork_delegate_linux.h
@@ -43,6 +43,18 @@ class ZygoteForkDelegate {
virtual bool CanHelp(const std::string& process_type, std::string* uma_name,
int* uma_sample, int* uma_boundary_value) = 0;
+ // Indexes of FDs in the vector passed to Fork().
+ enum {
+ // Used to pass in the descriptor for talking to the Browser
+ kBrowserFDIndex,
+ // The next two are used in the protocol for discovering the
+ // child processes real PID from within the SUID sandbox. See
+ // http://code.google.com/p/chromium/wiki/LinuxZygote
+ kDummyFDIndex,
+ kParentFDIndex,
+ kNumPassedFDs // Number of FDs in the vector passed to Fork().
+ };
+
// Delegate forks, returning a -1 on failure. Outside the
// suid sandbox, Fork() returns the Linux process ID.
// This method is not aware of any potential pid namespaces, so it'll
« no previous file with comments | « components/nacl/zygote/nacl_fork_delegate_linux.cc ('k') | content/zygote/zygote_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698