| 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/broker_services.h" | 5 #include "sandbox/win/src/broker_services.h" |
| 6 | 6 |
| 7 #include <AclAPI.h> | 7 #include <AclAPI.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // the policy objects ourselves. | 129 // the policy objects ourselves. |
| 130 ::PostQueuedCompletionStatus(job_port_.Get(), 0, THREAD_CTRL_QUIT, FALSE); | 130 ::PostQueuedCompletionStatus(job_port_.Get(), 0, THREAD_CTRL_QUIT, FALSE); |
| 131 | 131 |
| 132 if (job_thread_.IsValid() && | 132 if (job_thread_.IsValid() && |
| 133 WAIT_TIMEOUT == ::WaitForSingleObject(job_thread_.Get(), 1000)) { | 133 WAIT_TIMEOUT == ::WaitForSingleObject(job_thread_.Get(), 1000)) { |
| 134 // Cannot clean broker services. | 134 // Cannot clean broker services. |
| 135 NOTREACHED(); | 135 NOTREACHED(); |
| 136 return; | 136 return; |
| 137 } | 137 } |
| 138 | 138 |
| 139 STLDeleteElements(&tracker_list_); | 139 base::STLDeleteElements(&tracker_list_); |
| 140 delete thread_pool_; | 140 delete thread_pool_; |
| 141 | 141 |
| 142 ::DeleteCriticalSection(&lock_); | 142 ::DeleteCriticalSection(&lock_); |
| 143 } | 143 } |
| 144 | 144 |
| 145 TargetPolicy* BrokerServicesBase::CreatePolicy() { | 145 TargetPolicy* BrokerServicesBase::CreatePolicy() { |
| 146 // If you change the type of the object being created here you must also | 146 // If you change the type of the object being created here you must also |
| 147 // change the downcast to it in SpawnTarget(). | 147 // change the downcast to it in SpawnTarget(). |
| 148 return new PolicyBase; | 148 return new PolicyBase; |
| 149 } | 149 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ::WaitForSingleObject(no_targets_.Get(), INFINITE); | 472 ::WaitForSingleObject(no_targets_.Get(), INFINITE); |
| 473 return SBOX_ALL_OK; | 473 return SBOX_ALL_OK; |
| 474 } | 474 } |
| 475 | 475 |
| 476 bool BrokerServicesBase::IsActiveTarget(DWORD process_id) { | 476 bool BrokerServicesBase::IsActiveTarget(DWORD process_id) { |
| 477 AutoLock lock(&lock_); | 477 AutoLock lock(&lock_); |
| 478 return child_process_ids_.find(process_id) != child_process_ids_.end(); | 478 return child_process_ids_.find(process_id) != child_process_ids_.end(); |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace sandbox | 481 } // namespace sandbox |
| OLD | NEW |