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

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

Issue 1532423003: Have each SandboxedProcessLauncherDelegate maintain a zygote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/sandboxed_process_launcher_delegate.h
diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h
index a3aa4e06426534344883bdab2be7fe60536a296d..fdf5f5825b4d9919eb3a4c68e3dc6cf32989ccb2 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.h
+++ b/content/public/common/sandboxed_process_launcher_delegate.h
@@ -22,6 +22,13 @@ class TargetPolicy;
namespace content {
+#if defined(OS_LINUX)
+class ZygoteCommunication;
+using ZygoteHandle = ZygoteCommunication*;
+#else
+using ZygoteHandle = std::nullptr_t;
Avi (use Gerrit) 2016/01/06 19:07:56 #include <cstddef>
Greg K 2016/01/06 22:24:21 Done.
+#endif
+
// Allows a caller of StartSandboxedProcess or
// BrowserChildProcessHost/ChildProcessLauncher to control the sandbox policy,
// i.e. to loosen it if needed.
@@ -51,8 +58,10 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate {
virtual void PostSpawnTarget(base::ProcessHandle process) {}
#elif defined(OS_POSIX)
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
// Override this to return true to use the setuid sandbox.
- virtual bool ShouldUseZygote();
+ virtual ZygoteHandle* GetZygote();
+#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
// Override this if the process needs a non-empty environment map.
virtual base::EnvironmentMap GetEnvironment();

Powered by Google App Engine
This is Rietveld 408576698