Chromium Code Reviews| 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 6357211ee29bb536d3fdc63121e7fd03c909172b..0edfc353edd932e3bbe7fd854ac42525c159751c 100644 |
| --- a/content/public/common/sandboxed_process_launcher_delegate.h |
| +++ b/content/public/common/sandboxed_process_launcher_delegate.h |
| @@ -5,8 +5,11 @@ |
| #ifndef CONTENT_PUBLIC_COMMON_SANDBOXED_PROCESS_LAUNCHER_DELEGATE_H_ |
| #define CONTENT_PUBLIC_COMMON_SANDBOXED_PROCESS_LAUNCHER_DELEGATE_H_ |
| +#include "base/environment.h" |
| #include "base/process/process.h" |
| +#include "content/common/content_export.h" |
| + |
| namespace base { |
| class FilePath; |
| } |
| @@ -21,9 +24,15 @@ namespace content { |
| // BrowserChildProcessHost/ChildProcessLauncher to control the sandbox policy, |
| // i.e. to loosen it if needed. |
| // The methods below will be called on the PROCESS_LAUNCHER thread. |
| -class SandboxedProcessLauncherDelegate { |
| +class CONTENT_EXPORT SandboxedProcessLauncherDelegate { |
| public: |
| - virtual ~SandboxedProcessLauncherDelegate() {} |
| + virtual ~SandboxedProcessLauncherDelegate() { |
| + } |
|
jam
2014/02/26 19:47:52
nit: keep on one line as before, that's the conven
aberent
2014/02/28 08:51:07
Done.
|
| + |
| +#if defined(OS_WIN) |
| + // Override to return true if the process should be launched as an elevated |
| + // process (which implies no sandbox). |
| + virtual bool LaunchElevated(); |
|
jam
2014/02/26 19:47:52
nit: LaunchElevated could be confused in that cont
aberent
2014/02/28 08:51:07
Done.
|
| // By default, the process is launched sandboxed. Override this method and set |
| // |in_sandbox| to false if this process should be launched without a sandbox |
| @@ -43,6 +52,18 @@ class SandboxedProcessLauncherDelegate { |
| // Called right after the process is launched, but before its thread is run. |
| virtual void PostSpawnTarget(base::ProcessHandle process) {} |
| + |
| +#elif defined(OS_POSIX) |
| + // Override this to return true to use the setuid sandbox. |
| + virtual bool UseZygote(); |
|
jam
2014/02/26 19:47:52
nit: ditto re naming, this should be ShouldUseZygo
aberent
2014/02/28 08:51:07
Done.
|
| + |
| + // Override this if the process needs a non-empty environment map. |
| + virtual base::EnvironmentMap GetEnvironment(); |
| + |
| + // Return the File descriptor for the IPC channel. |
| + virtual int IpcFd() = 0; |
|
jam
2014/02/26 19:47:52
nit: GetIPCFD
aberent
2014/02/28 08:51:07
Done.
|
| + |
| +#endif |
| }; |
| } // namespace content |