OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ | 5 #ifndef SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ |
6 #define SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ | 6 #define SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "base/process/launch.h" | 11 #include "base/process/launch.h" |
9 #include "sandbox/mac/xpc.h" | 12 #include "sandbox/mac/xpc.h" |
10 | 13 |
11 namespace sandbox { | 14 namespace sandbox { |
12 | 15 |
13 // This PreExecDelegate will communicate with the BootstrapSandbox running | 16 // This PreExecDelegate will communicate with the BootstrapSandbox running |
14 // the Mach server registered under |sandbox_server_bootstrap_name|. It will | 17 // the Mach server registered under |sandbox_server_bootstrap_name|. It will |
15 // check in with th BootstrapSandbox using the |sandbox_token| and will | 18 // check in with th BootstrapSandbox using the |sandbox_token| and will |
16 // replace the task's bootstrap port with one provided by the sandbox. | 19 // replace the task's bootstrap port with one provided by the sandbox. |
17 class PreExecDelegate : public base::LaunchOptions::PreExecDelegate { | 20 class PreExecDelegate : public base::LaunchOptions::PreExecDelegate { |
(...skipping 23 matching lines...) Expand all Loading... |
41 // object needed to interact with the bootstrap server in RunAsyncSafe(). | 44 // object needed to interact with the bootstrap server in RunAsyncSafe(). |
42 // This is deliberately leaked in the fork()ed process. | 45 // This is deliberately leaked in the fork()ed process. |
43 xpc_object_t look_up_message_; | 46 xpc_object_t look_up_message_; |
44 | 47 |
45 DISALLOW_COPY_AND_ASSIGN(PreExecDelegate); | 48 DISALLOW_COPY_AND_ASSIGN(PreExecDelegate); |
46 }; | 49 }; |
47 | 50 |
48 } // namespace sandbox | 51 } // namespace sandbox |
49 | 52 |
50 #endif // SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ | 53 #endif // SANDBOX_MAC_PRE_EXEC_DELEGATE_H_ |
OLD | NEW |