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

Side by Side Diff: sandbox/win/src/sharedmem_ipc_server.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 | « sandbox/win/src/broker_services.cc ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 SharedMemIPCServer::~SharedMemIPCServer() { 57 SharedMemIPCServer::~SharedMemIPCServer() {
58 // Free the wait handles associated with the thread pool. 58 // Free the wait handles associated with the thread pool.
59 if (!thread_provider_->UnRegisterWaits(this)) { 59 if (!thread_provider_->UnRegisterWaits(this)) {
60 // Better to leak than to crash. 60 // Better to leak than to crash.
61 return; 61 return;
62 } 62 }
63 STLDeleteElements(&server_contexts_); 63 base::STLDeleteElements(&server_contexts_);
64 64
65 if (client_control_) 65 if (client_control_)
66 ::UnmapViewOfFile(client_control_); 66 ::UnmapViewOfFile(client_control_);
67 } 67 }
68 68
69 bool SharedMemIPCServer::Init(void* shared_mem, 69 bool SharedMemIPCServer::Init(void* shared_mem,
70 uint32_t shared_size, 70 uint32_t shared_size,
71 uint32_t channel_size) { 71 uint32_t channel_size) {
72 // The shared memory needs to be at least as big as a channel. 72 // The shared memory needs to be at least as big as a channel.
73 if (shared_size < channel_size) { 73 if (shared_size < channel_size) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 server_pong->Set(::CreateEventW(NULL, FALSE, FALSE, NULL)); 420 server_pong->Set(::CreateEventW(NULL, FALSE, FALSE, NULL));
421 if (!::DuplicateHandle(::GetCurrentProcess(), server_pong->Get(), 421 if (!::DuplicateHandle(::GetCurrentProcess(), server_pong->Get(),
422 target_process_, client_pong, kDesiredAccess, FALSE, 422 target_process_, client_pong, kDesiredAccess, FALSE,
423 0)) { 423 0)) {
424 return false; 424 return false;
425 } 425 }
426 return true; 426 return true;
427 } 427 }
428 428
429 } // namespace sandbox 429 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698