diff options
author | erikchen <erikchen@chromium.org> | 2015-07-30 15:26:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-30 22:27:15 +0000 |
commit | 8c73f834bc73178123389c29d7627e29cb09d501 (patch) | |
tree | 054914c7149c728b9034aca66f2199e52ab0f991 /ipc/ipc_channel_reader.cc | |
parent | fc59cb43df0e4eb77bc2916ab37d36598eabd4f2 (diff) | |
download | chromium_src-8c73f834bc73178123389c29d7627e29cb09d501.zip chromium_src-8c73f834bc73178123389c29d7627e29cb09d501.tar.gz chromium_src-8c73f834bc73178123389c29d7627e29cb09d501.tar.bz2 |
Reland #1: Clean up interface of attachment broker.
I forgot to initialize a member variable, which is why the original CL flakily
succeeded (and managed to pass the CQ).
Original issue's description:
> ipc: Clean up interface of attachment broker.
>
> AttachmentBrokerUnprivileged now has a method
> DesignateBrokerCommunicationChannel which is used by non-broker processes to
> designate an IPC::Channel as the communication medium for brokerable attachment
> messages. IPC::Channel has a new member attachment_broker_endpoint_ which causes
> it to pass all messages through the attachment broker before forwarding them to
> the listener.
>
> BUG=493414
>
> Committed: https://crrev.com/9a06836982214f2edced21bbd1615b49e7f231bf
> Cr-Commit-Position: refs/heads/master@{#341143}
BUG=493414
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1258323004
Cr-Commit-Position: refs/heads/master@{#341207}
Diffstat (limited to 'ipc/ipc_channel_reader.cc')
-rw-r--r-- | ipc/ipc_channel_reader.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc index 7e8902e..30f03a1 100644 --- a/ipc/ipc_channel_reader.cc +++ b/ipc/ipc_channel_reader.cc @@ -163,9 +163,18 @@ void ChannelReader::DispatchMessage(Message* m) { IPC_MESSAGE_ID_LINE(m->type())); #endif m->TraceMessageEnd(); - if (IsInternalMessage(*m)) + + bool handled = false; + if (IsInternalMessage(*m)) { HandleInternalMessage(*m); - else + handled = true; + } +#if USE_ATTACHMENT_BROKER + if (!handled && IsAttachmentBrokerEndpoint() && GetAttachmentBroker()) { + handled = GetAttachmentBroker()->OnMessageReceived(*m); + } +#endif // USE_ATTACHMENT_BROKER + if (!handled) listener_->OnMessageReceived(*m); if (m->dispatch_error()) listener_->OnBadMessageReceived(*m); |