Chromium Code Reviews| Index: ipc/ipc_channel_proxy.cc |
| diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc |
| index 37be200abc7a6ba254961ca23fd676ee580e27d1..901e9b33d206f3ec1518a1dc060838fa5aa101b4 100644 |
| --- a/ipc/ipc_channel_proxy.cc |
| +++ b/ipc/ipc_channel_proxy.cc |
| @@ -335,14 +335,15 @@ scoped_ptr<ChannelProxy> ChannelProxy::Create( |
| } |
| ChannelProxy::ChannelProxy(Context* context) |
| - : context_(context), |
| - did_init_(false) { |
| + : context_(context), did_init_(false), outgoing_message_filter_(NULL) { |
|
inferno
2015/03/05 18:46:48
each var on its own line.
inferno
2015/03/05 18:46:48
why not put this var inside ifdef, regular builds
|
| } |
| ChannelProxy::ChannelProxy( |
| Listener* listener, |
| const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) |
| - : context_(new Context(listener, ipc_task_runner)), did_init_(false) { |
| + : context_(new Context(listener, ipc_task_runner)), |
| + did_init_(false), |
| + outgoing_message_filter_(NULL) { |
| } |
| ChannelProxy::~ChannelProxy() { |
| @@ -411,6 +412,9 @@ bool ChannelProxy::Send(Message* message) { |
| // TODO(alexeypa): add DCHECK(CalledOnValidThread()) here. Currently there are |
| // tests that call Send() from a wrong thread. See http://crbug.com/163523. |
| + if (outgoing_message_filter()) |
|
inferno
2015/03/05 18:46:47
Please add a comment explaining what its purpose i
|
| + message = outgoing_message_filter()->Rewrite(message); |
| + |
| #ifdef IPC_MESSAGE_LOG_ENABLED |
| Logging::GetInstance()->OnSendMessage(message, context_->channel_id()); |
| #endif |