Index: ipc/ipc_sync_channel.cc |
=================================================================== |
--- ipc/ipc_sync_channel.cc (revision 83074) |
+++ ipc/ipc_sync_channel.cc (working copy) |
@@ -378,7 +378,8 @@ |
channel_handle, mode, ipc_message_loop, |
new SyncContext(listener, ipc_message_loop, shutdown_event), |
create_pipe_now), |
- sync_messages_with_no_timeout_allowed_(true) { |
+ sync_messages_with_no_timeout_allowed_(true), |
+ outgoing_message_filter_(NULL) { |
// Ideally we only want to watch this object when running a nested message |
// loop. However, we don't know when it exits if there's another nested |
// message loop running under it or not, so we wouldn't know whether to |
@@ -400,6 +401,9 @@ |
} |
bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) { |
+ if (outgoing_message_filter_) |
+ message = outgoing_message_filter_->Rewrite(message); |
+ |
if (!message->is_sync()) { |
ChannelProxy::Send(message); |
return true; |