OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/public/common/sandbox_init.h" | 5 #include "content/public/common/sandbox_init.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/common/sandbox_mac.h" | 10 #include "content/common/sandbox_mac.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 bool InitializeSandbox() { | 69 bool InitializeSandbox() { |
70 int sandbox_type = 0; | 70 int sandbox_type = 0; |
71 base::FilePath allowed_dir; | 71 base::FilePath allowed_dir; |
72 if (!GetSandboxTypeFromCommandLine(&sandbox_type, &allowed_dir)) | 72 if (!GetSandboxTypeFromCommandLine(&sandbox_type, &allowed_dir)) |
73 return true; | 73 return true; |
74 return InitializeSandbox(sandbox_type, allowed_dir); | 74 return InitializeSandbox(sandbox_type, allowed_dir); |
75 } | 75 } |
76 | 76 |
| 77 bool BrokerDuplicateSharedMemoryHandle( |
| 78 const base::SharedMemoryHandle& source_handle, |
| 79 base::ProcessId target_process_id, |
| 80 base::SharedMemoryHandle* target_handle) { |
| 81 *target_handle = base::SharedMemory::DuplicateHandle(source_handle); |
| 82 return base::SharedMemory::IsHandleValid(*target_handle); |
| 83 } |
| 84 |
77 extern const char kBootstrapPortNameForNPAPIPlugins[] = | 85 extern const char kBootstrapPortNameForNPAPIPlugins[] = |
78 "org.chromium.sandbox.real_bootstrap_server"; | 86 "org.chromium.sandbox.real_bootstrap_server"; |
79 | 87 |
80 } // namespace content | 88 } // namespace content |
OLD | NEW |