Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: sandbox/win/src/broker_services.cc

Issue 2234743002: sandbox: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sandbox/win/src/sharedmem_ipc_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | sandbox/win/src/sharedmem_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698