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

Unified Diff: mojo/system/raw_shared_buffer_win.cc

Issue 304233005: Mojo: Implement passing of shared buffers across processes on POSIX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 7 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_posix.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 5426028d7875ae44bbcba16fc168ff581295cc9d..fdccd363cb5d49e1629a71adba210b006dfd94e9 100644
--- a/mojo/system/raw_shared_buffer_win.cc
+++ b/mojo/system/raw_shared_buffer_win.cc
@@ -18,7 +18,7 @@ namespace system {
// RawSharedBuffer -------------------------------------------------------------
-bool RawSharedBuffer::InitNoLock() {
+bool RawSharedBuffer::Init() {
DCHECK(!handle_.is_valid());
// TODO(vtl): Currently, we only support mapping up to 2^32-1 bytes.
@@ -44,11 +44,17 @@ bool RawSharedBuffer::InitNoLock() {
return true;
}
-scoped_ptr<RawSharedBufferMapping> RawSharedBuffer::MapImplNoLock(
- size_t offset,
- size_t length) {
- lock_.AssertAcquired();
+bool RawSharedBuffer::InitFromPlatformHandle(
+ embedder::ScopedPlatformHandle platform_handle) {
+ DCHECK(!handle_.is_valid());
+
+ // TODO(vtl): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+scoped_ptr<RawSharedBufferMapping> 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;
« no previous file with comments | « mojo/system/raw_shared_buffer_posix.cc ('k') | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698