summaryrefslogtreecommitdiffstats
path: root/content/zygote/zygote_linux.h
diff options
context:
space:
mode:
authormdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-11 01:17:47 +0000
committermdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-11 01:17:47 +0000
commit54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e (patch)
treeee8f209267515175b3c9c11a52c1fce9a699c675 /content/zygote/zygote_linux.h
parent5cf28ab789a0fa2faf5050b8a60e296f25e808c6 (diff)
downloadchromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.zip
chromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.tar.gz
chromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.tar.bz2
Add support for multiple zygote fork delegates
No functional changes yet, just preparation for splitting NaCl's fork delegate into two different implementations. BUG=364945 Review URL: https://codereview.chromium.org/269413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269673 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/zygote/zygote_linux.h')
-rw-r--r--content/zygote/zygote_linux.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/content/zygote/zygote_linux.h b/content/zygote/zygote_linux.h
index 8e1996c..ef7e071 100644
--- a/content/zygote/zygote_linux.h
+++ b/content/zygote/zygote_linux.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_ZYGOTE_ZYGOTE_H_
#define CONTENT_ZYGOTE_ZYGOTE_H_
+#include <stddef.h>
+
#include <string>
#include "base/containers/small_map.h"
@@ -26,8 +28,7 @@ class ZygoteForkDelegate;
// runs it.
class Zygote {
public:
- Zygote(int sandbox_flags,
- ZygoteForkDelegate* helper);
+ Zygote(int sandbox_flags, ScopedVector<ZygoteForkDelegate> helpers);
~Zygote();
bool ProcessRequests();
@@ -36,9 +37,8 @@ class Zygote {
struct ZygoteProcessInfo {
// Pid from inside the Zygote's PID namespace.
base::ProcessHandle internal_pid;
- // Keeps track of whether or not a process was started from a fork
- // delegate helper.
- bool started_from_helper;
+ // Keeps track of which fork delegate helper the process was started from.
+ ZygoteForkDelegate* started_from_helper;
};
typedef base::SmallMap< std::map<base::ProcessHandle, ZygoteProcessInfo> >
ZygoteProcessMap;
@@ -119,13 +119,10 @@ class Zygote {
ZygoteProcessMap process_info_map_;
const int sandbox_flags_;
- ZygoteForkDelegate* helper_;
+ ScopedVector<ZygoteForkDelegate> helpers_;
- // These might be set by helper_->InitialUMA. They supply a UMA enumeration
- // sample we should report on the first fork.
- std::string initial_uma_name_;
- int initial_uma_sample_;
- int initial_uma_boundary_value_;
+ // Count of how many fork delegates for which we've invoked InitialUMA().
+ size_t initial_uma_index_;
};
} // namespace content