| 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/win/src/sandbox_policy_base.h" | 5 #include "sandbox/win/src/sandbox_policy_base.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 | 408 |
| 409 return SBOX_ALL_OK; | 409 return SBOX_ALL_OK; |
| 410 } | 410 } |
| 411 | 411 |
| 412 ResultCode PolicyBase::AddDllToUnload(const wchar_t* dll_name) { | 412 ResultCode PolicyBase::AddDllToUnload(const wchar_t* dll_name) { |
| 413 blacklisted_dlls_.push_back(dll_name); | 413 blacklisted_dlls_.push_back(dll_name); |
| 414 return SBOX_ALL_OK; | 414 return SBOX_ALL_OK; |
| 415 } | 415 } |
| 416 | 416 |
| 417 ResultCode PolicyBase::AddKernelObjectToClose(const char16* handle_type, | 417 ResultCode PolicyBase::AddKernelObjectToClose(const base::char16* handle_type, |
| 418 const char16* handle_name) { | 418 const base::char16* handle_name) { |
| 419 return handle_closer_.AddHandle(handle_type, handle_name); | 419 return handle_closer_.AddHandle(handle_type, handle_name); |
| 420 } | 420 } |
| 421 | 421 |
| 422 // When an IPC is ready in any of the targets we get called. We manage an array | 422 // When an IPC is ready in any of the targets we get called. We manage an array |
| 423 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate | 423 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate |
| 424 // to the appropriate dispatcher unless we can handle the IPC call ourselves. | 424 // to the appropriate dispatcher unless we can handle the IPC call ourselves. |
| 425 Dispatcher* PolicyBase::OnMessageReady(IPCParams* ipc, | 425 Dispatcher* PolicyBase::OnMessageReady(IPCParams* ipc, |
| 426 CallbackGeneric* callback) { | 426 CallbackGeneric* callback) { |
| 427 DCHECK(callback); | 427 DCHECK(callback); |
| 428 static const IPCParams ping1 = {IPC_PING1_TAG, ULONG_TYPE}; | 428 static const IPCParams ping1 = {IPC_PING1_TAG, ULONG_TYPE}; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 | 666 |
| 667 // Finally, setup imports on the target so the interceptions can work. | 667 // Finally, setup imports on the target so the interceptions can work. |
| 668 return SetupNtdllImports(target); | 668 return SetupNtdllImports(target); |
| 669 } | 669 } |
| 670 | 670 |
| 671 bool PolicyBase::SetupHandleCloser(TargetProcess* target) { | 671 bool PolicyBase::SetupHandleCloser(TargetProcess* target) { |
| 672 return handle_closer_.InitializeTargetHandles(target); | 672 return handle_closer_.InitializeTargetHandles(target); |
| 673 } | 673 } |
| 674 | 674 |
| 675 } // namespace sandbox | 675 } // namespace sandbox |
| OLD | NEW |