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

Unified Diff: mojo/system/message_pipe.cc

Issue 67413003: Mojo: Implement plumbing to support passing handles over MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: old chunk mismatch Created 7 years, 1 month 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
Index: mojo/system/message_pipe.cc
diff --git a/mojo/system/message_pipe.cc b/mojo/system/message_pipe.cc
index 857cdbcd2ba019221160e244eede76e8f3f2e8ea..f20102f1ea4e8216f96e7183d9a9a4818a7a065f 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -64,7 +64,7 @@ void MessagePipe::Close(unsigned port) {
MojoResult MessagePipe::WriteMessage(
unsigned port,
const void* bytes, uint32_t num_bytes,
- const MojoHandle* /*handles*/, uint32_t /*num_handles*/,
+ const std::vector<Dispatcher*>* /*dispatchers*/,
MojoWriteMessageFlags flags) {
DCHECK(port == 0 || port == 1);
return EnqueueMessage(
@@ -75,17 +75,20 @@ MojoResult MessagePipe::WriteMessage(
bytes, num_bytes));
}
-MojoResult MessagePipe::ReadMessage(unsigned port,
- void* bytes, uint32_t* num_bytes,
- MojoHandle* handles, uint32_t* num_handles,
- MojoReadMessageFlags flags) {
+MojoResult MessagePipe::ReadMessage(
+ unsigned port,
+ void* bytes, uint32_t* num_bytes,
+ uint32_t max_num_dispatchers,
+ std::vector<scoped_refptr<Dispatcher> >* dispatchers,
+ MojoReadMessageFlags flags) {
DCHECK(port == 0 || port == 1);
base::AutoLock locker(lock_);
DCHECK(endpoints_[port].get());
return endpoints_[port]->ReadMessage(bytes, num_bytes,
- handles, num_handles,
+ NULL, NULL,
+// handles, num_handles,
darin (slow to review) 2013/11/11 21:22:21 nit: remove commented out code or add a TODO?
viettrungluu 2013/11/11 22:40:26 Oops, deleted. Thanks.
flags);
}

Powered by Google App Engine
This is Rietveld 408576698