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

Unified Diff: ipc/mojo/ipc_message_pipe_reader.cc

Issue 1051443003: Implement IPC::ParamTraits<mojo::MessagePipeHandle> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made tests work, actually, on Windows. Created 5 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 | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/mojo/ipc_mojo.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_message_pipe_reader.cc
diff --git a/ipc/mojo/ipc_message_pipe_reader.cc b/ipc/mojo/ipc_message_pipe_reader.cc
index 61b36f6f384531dd68e0d7358f59889e5dca00d0..13bfbed6ad300b6dd0325c514d36f3560aaec98f 100644
--- a/ipc/mojo/ipc_message_pipe_reader.cc
+++ b/ipc/mojo/ipc_message_pipe_reader.cc
@@ -45,9 +45,7 @@ bool MessagePipeReader::Send(scoped_ptr<Message> message) {
message->TraceMessageBegin();
std::vector<MojoHandle> handles;
MojoResult result = MOJO_RESULT_OK;
-#if defined(OS_POSIX) && !defined(OS_NACL)
result = ChannelMojo::ReadFromMessageAttachmentSet(message.get(), &handles);
-#endif
if (result == MOJO_RESULT_OK) {
result = MojoWriteMessage(handle(),
message->data(),
@@ -72,16 +70,12 @@ void MessagePipeReader::OnMessageReceived() {
std::vector<MojoHandle> handle_buffer;
TakeHandleBuffer(&handle_buffer);
-#if defined(OS_POSIX) && !defined(OS_NACL)
MojoResult write_result =
ChannelMojo::WriteToMessageAttachmentSet(handle_buffer, &message);
if (write_result != MOJO_RESULT_OK) {
CloseWithError(write_result);
return;
}
-#else
- DCHECK(handle_buffer.empty());
-#endif
message.TraceMessageEnd();
delegate_->OnMessageReceived(message);
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/mojo/ipc_mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698