| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 "Process.Sandbox.Launch.Error", | 807 "Process.Sandbox.Launch.Error", |
| 808 last_error); | 808 last_error); |
| 809 } else | 809 } else |
| 810 DLOG(ERROR) << "Failed to launch process. Error: " << result; | 810 DLOG(ERROR) << "Failed to launch process. Error: " << result; |
| 811 | 811 |
| 812 return base::Process(); | 812 return base::Process(); |
| 813 } | 813 } |
| 814 | 814 |
| 815 delegate->PostSpawnTarget(target.process_handle()); | 815 delegate->PostSpawnTarget(target.process_handle()); |
| 816 | 816 |
| 817 CHECK(ResumeThread(target.thread_handle()) != -1); | 817 CHECK(ResumeThread(target.thread_handle()) != static_cast<DWORD>(-1)); |
| 818 return base::Process(target.TakeProcessHandle()); | 818 return base::Process(target.TakeProcessHandle()); |
| 819 } | 819 } |
| 820 | 820 |
| 821 bool BrokerDuplicateHandle(HANDLE source_handle, | 821 bool BrokerDuplicateHandle(HANDLE source_handle, |
| 822 DWORD target_process_id, | 822 DWORD target_process_id, |
| 823 HANDLE* target_handle, | 823 HANDLE* target_handle, |
| 824 DWORD desired_access, | 824 DWORD desired_access, |
| 825 DWORD options) { | 825 DWORD options) { |
| 826 // If our process is the target just duplicate the handle. | 826 // If our process is the target just duplicate the handle. |
| 827 if (::GetCurrentProcessId() == target_process_id) { | 827 if (::GetCurrentProcessId() == target_process_id) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 849 } | 849 } |
| 850 | 850 |
| 851 return false; | 851 return false; |
| 852 } | 852 } |
| 853 | 853 |
| 854 bool BrokerAddTargetPeer(HANDLE peer_process) { | 854 bool BrokerAddTargetPeer(HANDLE peer_process) { |
| 855 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; | 855 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; |
| 856 } | 856 } |
| 857 | 857 |
| 858 } // namespace content | 858 } // namespace content |
| OLD | NEW |