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

Unified Diff: content/zygote/zygote_linux.h

Issue 269413004: Add support for multiple zygote fork delegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IWYU Created 6 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 | « content/public/common/zygote_fork_delegate_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_linux.h
diff --git a/content/zygote/zygote_linux.h b/content/zygote/zygote_linux.h
index 8e1996cb874e48257c870119d9e9972f474db8e4..ef7e071c9f5b10be1ad6de5abb72ae28cc953d78 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
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698