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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class CommandLine; | 14 class CommandLine; |
15 class FilePath; | 15 class FilePath; |
16 } | 16 } |
17 | 17 |
18 namespace sandbox { | 18 namespace sandbox { |
19 class SandboxBPFPolicy; | 19 namespace bpf_dsl { |
| 20 class SandboxBPFDSLPolicy; |
| 21 } |
20 struct SandboxInterfaceInfo; | 22 struct SandboxInterfaceInfo; |
21 } | 23 } |
22 | 24 |
23 namespace content { | 25 namespace content { |
24 class SandboxedProcessLauncherDelegate; | 26 class SandboxedProcessLauncherDelegate; |
25 | 27 |
26 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
27 | 29 |
28 // Initialize the sandbox for renderer, gpu, utility, worker, nacl, and plug-in | 30 // Initialize the sandbox for renderer, gpu, utility, worker, nacl, and plug-in |
29 // processes, depending on the command line flags. Although The browser process | 31 // processes, depending on the command line flags. Although The browser process |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, | 81 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, |
80 const base::FilePath& allowed_path); | 82 const base::FilePath& allowed_path); |
81 | 83 |
82 #elif defined(OS_LINUX) | 84 #elif defined(OS_LINUX) |
83 | 85 |
84 class SandboxInitializerDelegate; | 86 class SandboxInitializerDelegate; |
85 | 87 |
86 // Initialize a seccomp-bpf sandbox. |policy| may not be NULL. | 88 // Initialize a seccomp-bpf sandbox. |policy| may not be NULL. |
87 // Returns true if the sandbox has been properly engaged. | 89 // Returns true if the sandbox has been properly engaged. |
88 CONTENT_EXPORT bool InitializeSandbox( | 90 CONTENT_EXPORT bool InitializeSandbox( |
89 scoped_ptr<sandbox::SandboxBPFPolicy> policy); | 91 scoped_ptr<sandbox::bpf_dsl::SandboxBPFDSLPolicy> policy); |
90 | 92 |
91 // Return a "baseline" policy. This is used by a SandboxInitializerDelegate to | 93 // Return a "baseline" policy. This is used by a SandboxInitializerDelegate to |
92 // implement a policy that is derived from the baseline. | 94 // implement a policy that is derived from the baseline. |
93 CONTENT_EXPORT scoped_ptr<sandbox::SandboxBPFPolicy> | 95 CONTENT_EXPORT scoped_ptr<sandbox::bpf_dsl::SandboxBPFDSLPolicy> |
94 GetBPFSandboxBaselinePolicy(); | 96 GetBPFSandboxBaselinePolicy(); |
95 #endif // defined(OS_LINUX) | 97 #endif // defined(OS_LINUX) |
96 | 98 |
97 } // namespace content | 99 } // namespace content |
98 | 100 |
99 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 101 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
OLD | NEW |