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