| 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 "content/common/sandbox_win.h" | 5 #include "content/common/sandbox_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 if (result == sandbox::SBOX_ERROR_GENERIC) | 715 if (result == sandbox::SBOX_ERROR_GENERIC) |
| 716 DPLOG(ERROR) << "Failed to launch process"; | 716 DPLOG(ERROR) << "Failed to launch process"; |
| 717 else | 717 else |
| 718 DLOG(ERROR) << "Failed to launch process. Error: " << result; | 718 DLOG(ERROR) << "Failed to launch process. Error: " << result; |
| 719 return 0; | 719 return 0; |
| 720 } | 720 } |
| 721 | 721 |
| 722 if (delegate) | 722 if (delegate) |
| 723 delegate->PostSpawnTarget(target.process_handle()); | 723 delegate->PostSpawnTarget(target.process_handle()); |
| 724 | 724 |
| 725 ResumeThread(target.thread_handle()); | 725 CHECK(ResumeThread(target.thread_handle()) != -1); |
| 726 TRACE_EVENT_END_ETW("StartProcessWithAccess", 0, type_str); | 726 TRACE_EVENT_END_ETW("StartProcessWithAccess", 0, type_str); |
| 727 return target.TakeProcessHandle(); | 727 return target.TakeProcessHandle(); |
| 728 } | 728 } |
| 729 | 729 |
| 730 bool BrokerDuplicateHandle(HANDLE source_handle, | 730 bool BrokerDuplicateHandle(HANDLE source_handle, |
| 731 DWORD target_process_id, | 731 DWORD target_process_id, |
| 732 HANDLE* target_handle, | 732 HANDLE* target_handle, |
| 733 DWORD desired_access, | 733 DWORD desired_access, |
| 734 DWORD options) { | 734 DWORD options) { |
| 735 // If our process is the target just duplicate the handle. | 735 // If our process is the target just duplicate the handle. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 759 } | 759 } |
| 760 | 760 |
| 761 return false; | 761 return false; |
| 762 } | 762 } |
| 763 | 763 |
| 764 bool BrokerAddTargetPeer(HANDLE peer_process) { | 764 bool BrokerAddTargetPeer(HANDLE peer_process) { |
| 765 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; | 765 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; |
| 766 } | 766 } |
| 767 | 767 |
| 768 } // namespace content | 768 } // namespace content |
| OLD | NEW |