Chromium Code Reviews| Index: base/files/memory_mapped_file.h |
| diff --git a/base/files/memory_mapped_file.h b/base/files/memory_mapped_file.h |
| index 8a7f045f351a0365d496f37f5824607cacfdc12e..6d56e1583bd5330852910a992ac016e944f6e6a4 100644 |
| --- a/base/files/memory_mapped_file.h |
| +++ b/base/files/memory_mapped_file.h |
| @@ -58,6 +58,14 @@ class BASE_EXPORT MemoryMappedFile { |
| // As above, but works with a region of an already-opened file. |
| bool Initialize(File file, const Region& region); |
| + // As above, works with an already-opened file and enables write permission |
| + // when |write| is true. |
| + bool Initialize(File file, bool write); |
| + |
| + // As above, but works with a region of an already-opened file and enables |
| + // write permission when |write| is true. |
| + bool Initialize(File file, const Region& region, bool write); |
|
wuchengli
2014/08/28 10:17:48
I think this can be added in the future when someo
|
| + |
| #if defined(OS_WIN) |
| // Opens an existing file and maps it as an image section. Please refer to |
| // the Initialize function above for additional information. |
| @@ -85,7 +93,8 @@ class BASE_EXPORT MemoryMappedFile { |
| // Map the file to memory, set data_ to that memory address. Return true on |
| // success, false on any kind of failure. This is a helper for Initialize(). |
| - bool MapFileRegionToMemory(const Region& region); |
| + // - |write| is used to enable write permission of mmap or not. |
|
wuchengli
2014/08/28 10:17:48
s/or not//
|
| + bool MapFileRegionToMemory(const Region& region, bool write); |
| // Closes all open handles. |
| void CloseHandles(); |