Index: ipc/ipc_channel_proxy.cc |
=================================================================== |
--- ipc/ipc_channel_proxy.cc (revision 83739) |
+++ ipc/ipc_channel_proxy.cc (working copy) |
@@ -281,7 +281,8 @@ |
Channel::Mode mode, |
Channel::Listener* listener, |
MessageLoop* ipc_thread) |
- : context_(new Context(listener, ipc_thread)) { |
+ : context_(new Context(listener, ipc_thread)), |
+ outgoing_message_filter_(NULL) { |
Init(channel_handle, mode, ipc_thread, true); |
} |
@@ -290,7 +291,8 @@ |
MessageLoop* ipc_thread, |
Context* context, |
bool create_pipe_now) |
- : context_(context) { |
+ : context_(context), |
+ outgoing_message_filter_(NULL) { |
Init(channel_handle, mode, ipc_thread, create_pipe_now); |
} |
@@ -340,6 +342,9 @@ |
} |
bool ChannelProxy::Send(Message* message) { |
+ if (outgoing_message_filter()) |
+ message = outgoing_message_filter()->Rewrite(message); |
+ |
#ifdef IPC_MESSAGE_LOG_ENABLED |
Logging::GetInstance()->OnSendMessage(message, context_->channel_id()); |
#endif |