Index: ipc/ipc_channel_reader.cc |
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc |
index 9055deb17759d39ebd82b22083b2e8609a15827e..2ee7449ea8de33a7d85b7bebadf30c4fe42549f5 100644 |
--- a/ipc/ipc_channel_reader.cc |
+++ b/ipc/ipc_channel_reader.cc |
@@ -38,9 +38,15 @@ bool ChannelReader::AsyncReadComplete(int bytes_read) { |
return DispatchInputData(input_buf_, bytes_read); |
} |
+bool ChannelReader::IsInternalMessage(const Message& m) const { |
+ return m.routing_id() == MSG_ROUTING_NONE && |
+ m.type() >= Channel::CLOSE_FD_MESSAGE_TYPE && |
+ m.type() <= Channel::HELLO_MESSAGE_TYPE; |
+} |
+ |
bool ChannelReader::IsHelloMessage(const Message& m) const { |
return m.routing_id() == MSG_ROUTING_NONE && |
- m.type() == Channel::HELLO_MESSAGE_TYPE; |
+ m.type() == Channel::HELLO_MESSAGE_TYPE; |
} |
bool ChannelReader::DispatchInputData(const char* input_data, |
@@ -84,8 +90,8 @@ bool ChannelReader::DispatchInputData(const char* input_data, |
"line", IPC_MESSAGE_ID_LINE(m.type())); |
#endif |
m.TraceMessageEnd(); |
- if (IsHelloMessage(m)) |
- HandleHelloMessage(m); |
+ if (IsInternalMessage(m)) |
+ HandleInternalMessage(m); |
else |
listener_->OnMessageReceived(m); |
p = message_tail; |