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 "sandbox/src/target_process.h" | 5 #include "sandbox/win/src/target_process.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/win/pe_image.h" | 9 #include "base/win/pe_image.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
11 #include "sandbox/src/crosscall_server.h" | 11 #include "sandbox/win/src/crosscall_server.h" |
12 #include "sandbox/src/crosscall_client.h" | 12 #include "sandbox/win/src/crosscall_client.h" |
13 #include "sandbox/src/policy_low_level.h" | 13 #include "sandbox/win/src/policy_low_level.h" |
14 #include "sandbox/src/sandbox_types.h" | 14 #include "sandbox/win/src/sandbox_types.h" |
15 #include "sandbox/src/sharedmem_ipc_server.h" | 15 #include "sandbox/win/src/sharedmem_ipc_server.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 void CopyPolicyToTarget(const void* source, size_t size, void* dest) { | 19 void CopyPolicyToTarget(const void* source, size_t size, void* dest) { |
20 if (!source || !size) | 20 if (!source || !size) |
21 return; | 21 return; |
22 memcpy(dest, source, size); | 22 memcpy(dest, source, size); |
23 sandbox::PolicyGlobal* policy = | 23 sandbox::PolicyGlobal* policy = |
24 reinterpret_cast<sandbox::PolicyGlobal*>(dest); | 24 reinterpret_cast<sandbox::PolicyGlobal*>(dest); |
25 | 25 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 | 347 |
348 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address) { | 348 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address) { |
349 TargetProcess* target = new TargetProcess(NULL, NULL, NULL, NULL); | 349 TargetProcess* target = new TargetProcess(NULL, NULL, NULL, NULL); |
350 target->sandbox_process_info_.Receive()->hProcess = process; | 350 target->sandbox_process_info_.Receive()->hProcess = process; |
351 target->base_address_ = base_address; | 351 target->base_address_ = base_address; |
352 return target; | 352 return target; |
353 } | 353 } |
354 | 354 |
355 } // namespace sandbox | 355 } // namespace sandbox |
OLD | NEW |