| 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 #include "base/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "sandbox/win/src/sharedmem_ipc_server.h" | 9 #include "sandbox/win/src/sharedmem_ipc_server.h" |
| 10 #include "sandbox/win/src/sharedmem_ipc_client.h" | 10 #include "sandbox/win/src/sharedmem_ipc_client.h" |
| 11 #include "sandbox/win/src/sandbox.h" | 11 #include "sandbox/win/src/sandbox.h" |
| 12 #include "sandbox/win/src/sandbox_types.h" | 12 #include "sandbox/win/src/sandbox_types.h" |
| 13 #include "sandbox/win/src/crosscall_params.h" | 13 #include "sandbox/win/src/crosscall_params.h" |
| 14 #include "sandbox/win/src/crosscall_server.h" | 14 #include "sandbox/win/src/crosscall_server.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 // This handle must not be closed. | 17 // This handle must not be closed. |
| 18 volatile HANDLE g_alive_mutex = NULL; | 18 volatile HANDLE g_alive_mutex = NULL; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace sandbox { | 21 namespace sandbox { |
| 22 | 22 |
| 23 SharedMemIPCServer::ServerControl::ServerControl() { |
| 24 } |
| 25 |
| 26 SharedMemIPCServer::ServerControl::~ServerControl() { |
| 27 } |
| 28 |
| 23 SharedMemIPCServer::SharedMemIPCServer(HANDLE target_process, | 29 SharedMemIPCServer::SharedMemIPCServer(HANDLE target_process, |
| 24 DWORD target_process_id, | 30 DWORD target_process_id, |
| 25 HANDLE target_job, | 31 HANDLE target_job, |
| 26 ThreadProvider* thread_provider, | 32 ThreadProvider* thread_provider, |
| 27 Dispatcher* dispatcher) | 33 Dispatcher* dispatcher) |
| 28 : client_control_(NULL), | 34 : client_control_(NULL), |
| 29 thread_provider_(thread_provider), | 35 thread_provider_(thread_provider), |
| 30 target_process_(target_process), | 36 target_process_(target_process), |
| 31 target_process_id_(target_process_id), | 37 target_process_id_(target_process_id), |
| 32 target_job_object_(target_job), | 38 target_job_object_(target_job), |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 server_pong->Set(::CreateEventW(NULL, FALSE, FALSE, NULL)); | 418 server_pong->Set(::CreateEventW(NULL, FALSE, FALSE, NULL)); |
| 413 if (!::DuplicateHandle(::GetCurrentProcess(), server_pong->Get(), | 419 if (!::DuplicateHandle(::GetCurrentProcess(), server_pong->Get(), |
| 414 target_process_, client_pong, kDesiredAccess, FALSE, | 420 target_process_, client_pong, kDesiredAccess, FALSE, |
| 415 0)) { | 421 0)) { |
| 416 return false; | 422 return false; |
| 417 } | 423 } |
| 418 return true; | 424 return true; |
| 419 } | 425 } |
| 420 | 426 |
| 421 } // namespace sandbox | 427 } // namespace sandbox |
| OLD | NEW |