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

Unified Diff: mojo/system/raw_shared_buffer_win.cc

Issue 471773002: Mojo: Add a platform interface for shared memory (embedder::PlatformSharedBuffer). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 6 years, 4 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/remote_message_pipe_unittest.cc » ('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 14f9c2e16b6dfb7b4cb1ccb227aeaa368311fd66..8e2fcc4a7b9335ea19d137a631e892fc52761a44 100644
--- a/mojo/system/raw_shared_buffer_win.cc
+++ b/mojo/system/raw_shared_buffer_win.cc
@@ -57,8 +57,9 @@ bool RawSharedBuffer::InitFromPlatformHandle(
return false;
}
-scoped_ptr<RawSharedBufferMapping> RawSharedBuffer::MapImpl(size_t offset,
- size_t length) {
+scoped_ptr<embedder::PlatformSharedBufferMapping> RawSharedBuffer::MapImpl(
+ size_t offset,
+ size_t length) {
size_t offset_rounding = offset % base::SysInfo::VMAllocationGranularity();
size_t real_offset = offset - offset_rounding;
size_t real_length = length + offset_rounding;
@@ -75,11 +76,11 @@ scoped_ptr<RawSharedBufferMapping> RawSharedBuffer::MapImpl(size_t offset,
real_length);
if (!real_base) {
PLOG(ERROR) << "MapViewOfFile";
- return scoped_ptr<RawSharedBufferMapping>();
+ return scoped_ptr<embedder::PlatformSharedBufferMapping>();
}
void* base = static_cast<char*>(real_base) + offset_rounding;
- return make_scoped_ptr(
+ return scoped_ptr<embedder::PlatformSharedBufferMapping>(
new RawSharedBufferMapping(base, length, real_base, real_length));
}
« no previous file with comments | « mojo/system/raw_shared_buffer_unittest.cc ('k') | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698