| OLD | NEW |
| 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" | |
| 9 | 8 |
| 10 namespace base { | 9 namespace base { |
| 11 | 10 |
| 12 SharedMemory::SharedMemory() | 11 SharedMemory::SharedMemory() |
| 13 : mapped_file_(NULL), | 12 : mapped_file_(NULL), |
| 14 memory_(NULL), | 13 memory_(NULL), |
| 15 read_only_(false), | 14 read_only_(false), |
| 16 max_size_(0), | 15 max_size_(0), |
| 17 lock_(NULL) { | 16 lock_(NULL) { |
| 18 } | 17 } |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void SharedMemory::Unlock() { | 188 void SharedMemory::Unlock() { |
| 190 DCHECK(lock_ != NULL); | 189 DCHECK(lock_ != NULL); |
| 191 ReleaseMutex(lock_); | 190 ReleaseMutex(lock_); |
| 192 } | 191 } |
| 193 | 192 |
| 194 SharedMemoryHandle SharedMemory::handle() const { | 193 SharedMemoryHandle SharedMemory::handle() const { |
| 195 return mapped_file_; | 194 return mapped_file_; |
| 196 } | 195 } |
| 197 | 196 |
| 198 } // namespace base | 197 } // namespace base |
| OLD | NEW |