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

Unified Diff: ipc/mojo/ipc_message_pipe_reader.h

Issue 780223002: ChannelProxy: Send() from UI thread when ChannelMojo is used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: ipc/mojo/ipc_message_pipe_reader.h
diff --git a/ipc/mojo/ipc_message_pipe_reader.h b/ipc/mojo/ipc_message_pipe_reader.h
index ee1d3b5caa7f046dd20117191bdc3eb7d8d19284..30d3219763e986ffa6d7bbd44aa0a57c3e249b25 100644
--- a/ipc/mojo/ipc_message_pipe_reader.h
+++ b/ipc/mojo/ipc_message_pipe_reader.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/task_runner.h"
#include "ipc/ipc_message.h"
#include "mojo/public/c/environment/async_waiter.h"
#include "mojo/public/cpp/system/core.h"
@@ -80,7 +81,10 @@ class MessagePipeReader {
// Return true if the MessagePipe is alive.
bool IsValid() { return pipe_.is_valid(); }
- bool Send(scoped_ptr<Message> message);
+ // |Send()| doesn't notify error nor close the message pipe. The caller must
+ // handle the error if the return value isn't |MOJO_RESULT_OK|. This policy
+ // gives some flexibility when to do the error notification.
+ MojoResult Send(scoped_ptr<Message> message);
private:
static void InvokePipeIsReady(void* closure, MojoResult result);

Powered by Google App Engine
This is Rietveld 408576698