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

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: Cleanup: move constants 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
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..c900a843beac5e368502cc8a084b4b635d4b74df 100644
--- a/content/public/common/zygote_fork_delegate_linux.h
+++ b/content/public/common/zygote_fork_delegate_linux.h
@@ -43,6 +43,17 @@ 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 = 0,
+ // 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 = 1,
+ kParentFDIndex = 2
jln (very slow on Chromium) 2013/10/07 18:12:06 With MACRO_STYLE, in Chromium, it's typical to hav
Mark Seaborn 2013/10/08 18:31:06 Added kNumPassedFds.
+ };
+
// 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

Powered by Google App Engine
This is Rietveld 408576698