| 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 DPLOG(ERROR) << "Failed to launch process"; | 732 DPLOG(ERROR) << "Failed to launch process"; |
| 733 else | 733 else |
| 734 DLOG(ERROR) << "Failed to launch process. Error: " << result; | 734 DLOG(ERROR) << "Failed to launch process. Error: " << result; |
| 735 return 0; | 735 return 0; |
| 736 } | 736 } |
| 737 | 737 |
| 738 if (delegate) | 738 if (delegate) |
| 739 delegate->PostSpawnTarget(target.process_handle()); | 739 delegate->PostSpawnTarget(target.process_handle()); |
| 740 | 740 |
| 741 ResumeThread(target.thread_handle()); | 741 ResumeThread(target.thread_handle()); |
| 742 TRACE_EVENT_END_ETW("StartProcessWithAccess", 0, type_str); |
| 742 return target.TakeProcessHandle(); | 743 return target.TakeProcessHandle(); |
| 743 } | 744 } |
| 744 | 745 |
| 745 bool BrokerDuplicateHandle(HANDLE source_handle, | 746 bool BrokerDuplicateHandle(HANDLE source_handle, |
| 746 DWORD target_process_id, | 747 DWORD target_process_id, |
| 747 HANDLE* target_handle, | 748 HANDLE* target_handle, |
| 748 DWORD desired_access, | 749 DWORD desired_access, |
| 749 DWORD options) { | 750 DWORD options) { |
| 750 // If our process is the target just duplicate the handle. | 751 // If our process is the target just duplicate the handle. |
| 751 if (::GetCurrentProcessId() == target_process_id) { | 752 if (::GetCurrentProcessId() == target_process_id) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 774 } | 775 } |
| 775 | 776 |
| 776 return false; | 777 return false; |
| 777 } | 778 } |
| 778 | 779 |
| 779 bool BrokerAddTargetPeer(HANDLE peer_process) { | 780 bool BrokerAddTargetPeer(HANDLE peer_process) { |
| 780 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; | 781 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; |
| 781 } | 782 } |
| 782 | 783 |
| 783 } // namespace content | 784 } // namespace content |
| OLD | NEW |