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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Initialize the sandbox of the given |sandbox_type|, optionally specifying a | 61 // Initialize the sandbox of the given |sandbox_type|, optionally specifying a |
62 // directory to allow access to. Note specifying a directory needs to be | 62 // directory to allow access to. Note specifying a directory needs to be |
63 // supported by the sandbox profile associated with the given |sandbox_type|. | 63 // supported by the sandbox profile associated with the given |sandbox_type|. |
64 // Valid values for |sandbox_type| are defined either by the enum SandboxType, | 64 // Valid values for |sandbox_type| are defined either by the enum SandboxType, |
65 // or by ContentClient::GetSandboxProfileForSandboxType(). | 65 // or by ContentClient::GetSandboxProfileForSandboxType(). |
66 // | 66 // |
67 // If the |sandbox_type| isn't one of the ones defined by content then the | 67 // If the |sandbox_type| isn't one of the ones defined by content then the |
68 // embedder is queried using ContentClient::GetSandboxPolicyForSandboxType(). | 68 // embedder is queried using ContentClient::GetSandboxPolicyForSandboxType(). |
69 // The embedder can use values for |sandbox_type| starting from | 69 // The embedder can use values for |sandbox_type| starting from |
70 // content::sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE. | 70 // sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE. |
71 // | 71 // |
72 // Returns true if the sandbox was initialized succesfully, false if an error | 72 // Returns true if the sandbox was initialized succesfully, false if an error |
73 // occurred. If process_type isn't one that needs sandboxing, no action is | 73 // occurred. If process_type isn't one that needs sandboxing, no action is |
74 // taken and true is always returned. | 74 // taken and true is always returned. |
75 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, | 75 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, |
76 const FilePath& allowed_path); | 76 const FilePath& allowed_path); |
77 | 77 |
78 #elif defined(OS_LINUX) | 78 #elif defined(OS_LINUX) |
79 | 79 |
80 // Initialize the sandbox (currently seccomp-legacy or seccomp-bpf, the setuid | 80 // Initialize the sandbox (currently seccomp-legacy or seccomp-bpf, the setuid |
(...skipping 14 matching lines...) Expand all Loading... |
95 // DUPLICATE_SAME_ACCESS flag. On posix it behaves essentially the same as | 95 // DUPLICATE_SAME_ACCESS flag. On posix it behaves essentially the same as |
96 // IPC::GetFileHandleForProcess() | 96 // IPC::GetFileHandleForProcess() |
97 CONTENT_EXPORT IPC::PlatformFileForTransit BrokerGetFileHandleForProcess( | 97 CONTENT_EXPORT IPC::PlatformFileForTransit BrokerGetFileHandleForProcess( |
98 base::PlatformFile handle, | 98 base::PlatformFile handle, |
99 base::ProcessId target_process_id, | 99 base::ProcessId target_process_id, |
100 bool should_close_source); | 100 bool should_close_source); |
101 | 101 |
102 } // namespace content | 102 } // namespace content |
103 | 103 |
104 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 104 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
OLD | NEW |