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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 227383006: Mojo: Allow dispatchers to attach PlatformHandles to the MessageInTransit on serialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/message_pipe_dispatcher.h ('k') | mojo/system/shared_buffer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher.cc
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc
index a22b3a716dac3539d124b70073e1dd7b19efec88..3559131eab85fb2872e1c728e5a1fbaf536e9c57 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -172,15 +172,20 @@ void MessagePipeDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) {
message_pipe_->RemoveWaiter(port_, waiter);
}
-size_t MessagePipeDispatcher::GetMaximumSerializedSizeImplNoLock(
- const Channel* /*channel*/) const {
+void MessagePipeDispatcher::StartSerializeImplNoLock(
+ Channel* /*channel*/,
+ size_t* max_size,
+ size_t* max_platform_handles) {
DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
- return sizeof(SerializedMessagePipeDispatcher);
+ *max_size = sizeof(SerializedMessagePipeDispatcher);
+ *max_platform_handles = 0;
}
-bool MessagePipeDispatcher::SerializeAndCloseImplNoLock(Channel* channel,
- void* destination,
- size_t* actual_size) {
+bool MessagePipeDispatcher::EndSerializeAndCloseImplNoLock(
+ Channel* channel,
+ void* destination,
+ size_t* actual_size,
+ std::vector<embedder::PlatformHandle>* platform_handles) {
DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
// Convert the local endpoint to a proxy endpoint (moving the message queue).
« no previous file with comments | « mojo/system/message_pipe_dispatcher.h ('k') | mojo/system/shared_buffer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698