OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
6 #define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 6 #define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 CONTENT_EXPORT bool InitializeSandbox( | 43 CONTENT_EXPORT bool InitializeSandbox( |
44 sandbox::SandboxInterfaceInfo* sandbox_info); | 44 sandbox::SandboxInterfaceInfo* sandbox_info); |
45 | 45 |
46 // Launch a sandboxed process. |delegate| may be NULL. If |delegate| is non-NULL | 46 // Launch a sandboxed process. |delegate| may be NULL. If |delegate| is non-NULL |
47 // then it just has to outlive this method call. |handles_to_inherit| is a list | 47 // then it just has to outlive this method call. |handles_to_inherit| is a list |
48 // of handles for the child process to inherit. The caller retains ownership of | 48 // of handles for the child process to inherit. The caller retains ownership of |
49 // the handles. | 49 // the handles. |
50 CONTENT_EXPORT sandbox::ResultCode StartSandboxedProcess( | 50 CONTENT_EXPORT sandbox::ResultCode StartSandboxedProcess( |
51 SandboxedProcessLauncherDelegate* delegate, | 51 SandboxedProcessLauncherDelegate* delegate, |
52 base::CommandLine* cmd_line, | 52 base::CommandLine* cmd_line, |
53 const base::HandlesToInheritVector& handles_to_inherit, | 53 const std::vector<HANDLE>& handles_to_inherit, |
54 base::Process* process); | 54 base::Process* process); |
55 | 55 |
56 #elif defined(OS_MACOSX) | 56 #elif defined(OS_MACOSX) |
57 | 57 |
58 // Initialize the sandbox of the given |sandbox_type|, optionally specifying a | 58 // Initialize the sandbox of the given |sandbox_type|, optionally specifying a |
59 // directory to allow access to. Note specifying a directory needs to be | 59 // directory to allow access to. Note specifying a directory needs to be |
60 // supported by the sandbox profile associated with the given |sandbox_type|. | 60 // supported by the sandbox profile associated with the given |sandbox_type|. |
61 // Valid values for |sandbox_type| are defined either by the enum SandboxType, | 61 // Valid values for |sandbox_type| are defined either by the enum SandboxType, |
62 // or by ContentClient::GetSandboxProfileForSandboxType(). | 62 // or by ContentClient::GetSandboxProfileForSandboxType(). |
63 // | 63 // |
(...skipping 22 matching lines...) Expand all Loading... |
86 | 86 |
87 // Return a "baseline" policy. This is used by a SandboxInitializerDelegate to | 87 // Return a "baseline" policy. This is used by a SandboxInitializerDelegate to |
88 // implement a policy that is derived from the baseline. | 88 // implement a policy that is derived from the baseline. |
89 CONTENT_EXPORT std::unique_ptr<sandbox::bpf_dsl::Policy> | 89 CONTENT_EXPORT std::unique_ptr<sandbox::bpf_dsl::Policy> |
90 GetBPFSandboxBaselinePolicy(); | 90 GetBPFSandboxBaselinePolicy(); |
91 #endif // defined(OS_LINUX) || defined(OS_NACL_NONSFI) | 91 #endif // defined(OS_LINUX) || defined(OS_NACL_NONSFI) |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
94 | 94 |
95 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 95 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
OLD | NEW |