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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/process.h" | 9 #include "base/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 #include "ipc/ipc_platform_file.h" |
12 | 13 |
13 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
14 namespace sandbox { | 15 namespace sandbox { |
15 struct SandboxInterfaceInfo; | 16 struct SandboxInterfaceInfo; |
16 } | 17 } |
17 #elif defined(OS_MACOSX) | 18 #elif defined(OS_MACOSX) |
18 class FilePath; | 19 class FilePath; |
19 #endif | 20 #endif |
20 | 21 |
21 namespace content { | 22 namespace content { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // taken and true is always returned. | 70 // taken and true is always returned. |
70 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, | 71 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, |
71 const FilePath& allowed_path); | 72 const FilePath& allowed_path); |
72 | 73 |
73 #elif defined(OS_LINUX) | 74 #elif defined(OS_LINUX) |
74 | 75 |
75 CONTENT_EXPORT void InitializeSandbox(); | 76 CONTENT_EXPORT void InitializeSandbox(); |
76 | 77 |
77 #endif | 78 #endif |
78 | 79 |
| 80 // Platform neutral wrapper for making an exact copy of a handle for use in |
| 81 // the target process. On Windows this wraps BrokerDuplicateHandle() with the |
| 82 // DUPLICATE_SAME_ACCESS flag. On posix it behaves essentially the same as |
| 83 // IPC::GetFileHandleForProcess() |
| 84 CONTENT_EXPORT IPC::PlatformFileForTransit BrokerGetFileHandleForProcess( |
| 85 base::PlatformFile handle, |
| 86 base::ProcessId target_process_id, |
| 87 bool should_close_source); |
| 88 |
79 } // namespace content | 89 } // namespace content |
80 | 90 |
81 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ | 91 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ |
OLD | NEW |