Index: mojo/system/raw_shared_buffer_win.cc |
diff --git a/mojo/system/raw_shared_buffer_win.cc b/mojo/system/raw_shared_buffer_win.cc |
index e67501d26a72b428f8567f0e8f5706f40f54a385..5426028d7875ae44bbcba16fc168ff581295cc9d 100644 |
--- a/mojo/system/raw_shared_buffer_win.cc |
+++ b/mojo/system/raw_shared_buffer_win.cc |
@@ -16,13 +16,6 @@ |
namespace mojo { |
namespace system { |
-// RawSharedBuffer::Mapping ---------------------------------------------------- |
- |
-void RawSharedBuffer::Mapping::Unmap() { |
- BOOL result = UnmapViewOfFile(real_base_); |
- PLOG_IF(ERROR, !result) << "UnmapViewOfFile"; |
-} |
- |
// RawSharedBuffer ------------------------------------------------------------- |
bool RawSharedBuffer::InitNoLock() { |
@@ -51,7 +44,7 @@ bool RawSharedBuffer::InitNoLock() { |
return true; |
} |
-scoped_ptr<RawSharedBuffer::Mapping> RawSharedBuffer::MapImplNoLock( |
+scoped_ptr<RawSharedBufferMapping> RawSharedBuffer::MapImplNoLock( |
size_t offset, |
size_t length) { |
lock_.AssertAcquired(); |
@@ -70,11 +63,19 @@ scoped_ptr<RawSharedBuffer::Mapping> RawSharedBuffer::MapImplNoLock( |
static_cast<DWORD>(real_offset), real_length); |
if (!real_base) { |
PLOG(ERROR) << "MapViewOfFile"; |
- return scoped_ptr<Mapping>(); |
+ return scoped_ptr<RawSharedBufferMapping>(); |
} |
void* base = static_cast<char*>(real_base) + offset_rounding; |
- return make_scoped_ptr(new Mapping(base, length, real_base, real_length)); |
+ return make_scoped_ptr( |
+ new RawSharedBufferMapping(base, length, real_base, real_length)); |
+} |
+ |
+// RawSharedBufferMapping ------------------------------------------------------ |
+ |
+void RawSharedBufferMapping::Unmap() { |
+ BOOL result = UnmapViewOfFile(real_base_); |
+ PLOG_IF(ERROR, !result) << "UnmapViewOfFile"; |
} |
} // namespace system |