diff options
author | sammc <sammc@chromium.org> | 2016-03-09 17:42:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-10 01:43:27 +0000 |
commit | 013cfed7ecf91b0700bec7147631d4fbedb6b64e (patch) | |
tree | 756cf2ff9fb0fe1ad81363cee2c6582ee30f7d5c /ipc/mojo/ipc_message_pipe_reader.h | |
parent | 2292849b75d884faff3d77c37b4fcf9743e13388 (diff) | |
download | chromium_src-013cfed7ecf91b0700bec7147631d4fbedb6b64e.zip chromium_src-013cfed7ecf91b0700bec7147631d4fbedb6b64e.tar.gz chromium_src-013cfed7ecf91b0700bec7147631d4fbedb6b64e.tar.bz2 |
Fix failing tests with ChannelMojo enabled.
This ChannelMojo to:
- take a ScopedMessagePipeHandle instead of a string token so an
in-process renderer can be passed the message pipe directly;
- send brokered attachments as mojo handles; and
- offer messages to AttachmentBroker.
This also fixes and re-enables ipc_channel_mojo_unittest.cc.
BUG=579813
Review URL: https://codereview.chromium.org/1768903002
Cr-Commit-Position: refs/heads/master@{#380294}
Diffstat (limited to 'ipc/mojo/ipc_message_pipe_reader.h')
-rw-r--r-- | ipc/mojo/ipc_message_pipe_reader.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ipc/mojo/ipc_message_pipe_reader.h b/ipc/mojo/ipc_message_pipe_reader.h index 38ca6a8..75fe7ad 100644 --- a/ipc/mojo/ipc_message_pipe_reader.h +++ b/ipc/mojo/ipc_message_pipe_reader.h @@ -71,6 +71,7 @@ class MessagePipeReader : public mojom::Channel { // Note that MessagePipeReader doesn't delete |delegate|. MessagePipeReader(mojom::ChannelAssociatedPtr sender, mojo::AssociatedInterfaceRequest<mojom::Channel> receiver, + base::ProcessId peer_pid, Delegate* delegate); ~MessagePipeReader() override; @@ -84,6 +85,8 @@ class MessagePipeReader : public mojom::Channel { bool Send(scoped_ptr<Message> message); + base::ProcessId GetPeerPid() const { return peer_pid_; } + protected: void OnPipeClosed(); void OnPipeError(MojoResult error); @@ -93,6 +96,7 @@ class MessagePipeReader : public mojom::Channel { // |delegate_| is null once the message pipe is closed. Delegate* delegate_; + base::ProcessId peer_pid_; mojom::ChannelAssociatedPtr sender_; mojo::AssociatedBinding<mojom::Channel> binding_; base::ThreadChecker thread_checker_; |