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

Unified Diff: mojo/system/raw_shared_buffer_win.cc

Issue 219023010: Mojo: RawSharedBuffer::Mapping -> RawSharedBufferMapping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/raw_shared_buffer_unittest.cc ('k') | mojo/system/shared_buffer_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/system/raw_shared_buffer_unittest.cc ('k') | mojo/system/shared_buffer_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698