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

Unified Diff: ipc/ipc_channel_reader.cc

Issue 1258323004: Reland #1: Clean up interface of attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/ipc_channel_reader.h ('k') | ipc/ipc_channel_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_reader.cc
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc
index 7e8902e54d2a894a9cfe65df489e3f999c9386c5..30f03a1f2decbb2fd74b690baf5cc22eeb392ef5 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);
« no previous file with comments | « ipc/ipc_channel_reader.h ('k') | ipc/ipc_channel_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698