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/process.h" | 8 #include "base/process.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 // sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE. | 73 // sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE. |
74 // | 74 // |
75 // Returns true if the sandbox was initialized succesfully, false if an error | 75 // Returns true if the sandbox was initialized succesfully, false if an error |
76 // occurred. If process_type isn't one that needs sandboxing, no action is | 76 // occurred. If process_type isn't one that needs sandboxing, no action is |
77 // taken and true is always returned. | 77 // taken and true is always returned. |
78 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, | 78 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, |
79 const base::FilePath& allowed_path); | 79 const base::FilePath& allowed_path); |
80 | 80 |
81 #elif defined(OS_LINUX) | 81 #elif defined(OS_LINUX) |
82 | 82 |
83 // Initialize the sandbox (currently seccomp-legacy or seccomp-bpf, the setuid | 83 // Not implemented at the moment. |
jam
2013/04/12 23:25:34
nit: why not delete this method now and the cc fil
jln (very slow on Chromium)
2013/04/12 23:54:02
I thought it would be nicer to point to the bug pl
| |
84 // sandbox works differently and is set-up in the Zygote). | |
85 // The process sandbox type is determined at run time via the command line | |
86 // switches. TODO(jln): switch to a model where the caller chooses a sandbox | |
87 // type. | |
88 // This should be called before any additional thread has been created. | |
89 // | |
90 // Returns true if a sandbox has been initialized successfully, false | |
91 // otherwise. | |
92 CONTENT_EXPORT bool InitializeSandbox(); | 84 CONTENT_EXPORT bool InitializeSandbox(); |
93 | 85 |
94 #endif | 86 #endif |
95 | 87 |
96 } // namespace content | 88 } // namespace content |
97 | 89 |
98 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 90 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
OLD | NEW |