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

Side by Side Diff: base/shared_memory_win.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/shared_memory_unittest.cc ('k') | base/stats_table.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/shared_memory.h" 5 #include "base/shared_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win_util.h" 8 #include "base/win_util.h"
9 9
10 namespace base {
11
10 SharedMemory::SharedMemory() 12 SharedMemory::SharedMemory()
11 : mapped_file_(NULL), 13 : mapped_file_(NULL),
12 memory_(NULL), 14 memory_(NULL),
13 read_only_(false), 15 read_only_(false),
14 max_size_(0), 16 max_size_(0),
15 lock_(NULL) { 17 lock_(NULL) {
16 } 18 }
17 19
18 SharedMemory::SharedMemory(SharedMemoryHandle handle, bool read_only) 20 SharedMemory::SharedMemory(SharedMemoryHandle handle, bool read_only)
19 : mapped_file_(handle), 21 : mapped_file_(handle),
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 156 }
155 } 157 }
156 WaitForSingleObject(lock_, INFINITE); 158 WaitForSingleObject(lock_, INFINITE);
157 } 159 }
158 160
159 void SharedMemory::Unlock() { 161 void SharedMemory::Unlock() {
160 DCHECK(lock_ != NULL); 162 DCHECK(lock_ != NULL);
161 ReleaseMutex(lock_); 163 ReleaseMutex(lock_);
162 } 164 }
163 165
166 } // namespace base
OLDNEW
« no previous file with comments | « base/shared_memory_unittest.cc ('k') | base/stats_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698