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

Side by Side Diff: base/memory/shared_memory.h

Issue 196073002: Move ScopedFILE to base namespace and scoped_file.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « base/files/scoped_file.h ('k') | base/memory/shared_memory_posix.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 #ifndef BASE_MEMORY_SHARED_MEMORY_H_ 5 #ifndef BASE_MEMORY_SHARED_MEMORY_H_
6 #define BASE_MEMORY_SHARED_MEMORY_H_ 6 #define BASE_MEMORY_SHARED_MEMORY_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // used in inner loops, so we protect against multiple threads in a 253 // used in inner loops, so we protect against multiple threads in a
254 // critical section using a class global lock. 254 // critical section using a class global lock.
255 void LockDeprecated(); 255 void LockDeprecated();
256 256
257 // DEPRECATED (crbug.com/345734): 257 // DEPRECATED (crbug.com/345734):
258 // Releases the shared memory lock. 258 // Releases the shared memory lock.
259 void UnlockDeprecated(); 259 void UnlockDeprecated();
260 260
261 private: 261 private:
262 #if defined(OS_POSIX) && !defined(OS_NACL) 262 #if defined(OS_POSIX) && !defined(OS_NACL)
263 bool PrepareMapFile(file_util::ScopedFILE fp, base::ScopedFD readonly); 263 bool PrepareMapFile(ScopedFILE fp, ScopedFD readonly);
264 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path); 264 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path);
265 void LockOrUnlockCommon(int function); 265 void LockOrUnlockCommon(int function);
266 #endif 266 #endif
267 enum ShareMode { 267 enum ShareMode {
268 SHARE_READONLY, 268 SHARE_READONLY,
269 SHARE_CURRENT_MODE, 269 SHARE_CURRENT_MODE,
270 }; 270 };
271 bool ShareToProcessCommon(ProcessHandle process, 271 bool ShareToProcessCommon(ProcessHandle process,
272 SharedMemoryHandle* new_handle, 272 SharedMemoryHandle* new_handle,
273 bool close_self, 273 bool close_self,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 private: 309 private:
310 SharedMemory* shared_memory_; 310 SharedMemory* shared_memory_;
311 DISALLOW_COPY_AND_ASSIGN(SharedMemoryAutoLockDeprecated); 311 DISALLOW_COPY_AND_ASSIGN(SharedMemoryAutoLockDeprecated);
312 }; 312 };
313 313
314 } // namespace base 314 } // namespace base
315 315
316 #endif // BASE_MEMORY_SHARED_MEMORY_H_ 316 #endif // BASE_MEMORY_SHARED_MEMORY_H_
OLDNEW
« no previous file with comments | « base/files/scoped_file.h ('k') | base/memory/shared_memory_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698