| Index: ipc/ipc_send_fds_test.cc
|
| diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
|
| index 264aa855f91080fdd2d09352b15e3af6df70e16f..2d5616bf47660c6cdd2abd0c206a8ae3682aa12e 100644
|
| --- a/ipc/ipc_send_fds_test.cc
|
| +++ b/ipc/ipc_send_fds_test.cc
|
| @@ -8,7 +8,7 @@
|
| #if defined(OS_MACOSX)
|
| extern "C" {
|
| #include <sandbox.h>
|
| -}
|
| +};
|
| #endif
|
| #include <fcntl.h>
|
| #include <stddef.h>
|
| @@ -33,6 +33,10 @@ extern "C" {
|
| #include "base/macros.h"
|
| #endif
|
|
|
| +#if defined(OS_MACOSX)
|
| +#include "sandbox/mac/seatbelt.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| const unsigned kNumFDsToSend = 7; // per message
|
| @@ -193,16 +197,13 @@ MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendFdsSandboxedClient) {
|
|
|
| // Enable the sandbox.
|
| char* error_buff = NULL;
|
| -#pragma clang diagnostic push
|
| -#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
| - int error = sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED,
|
| - &error_buff);
|
| + int error = sandbox::Seatbelt::Init(kSBXProfilePureComputation, SANDBOX_NAMED,
|
| + &error_buff);
|
| bool success = (error == 0 && error_buff == NULL);
|
| if (!success)
|
| return -1;
|
|
|
| - sandbox_free_error(error_buff);
|
| -#pragma clang diagnostic pop
|
| + sandbox::Seatbelt::FreeError(error_buff);
|
|
|
| // Make sure sandbox is really enabled.
|
| if (open(kDevZeroPath, O_RDONLY) != -1) {
|
|
|