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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 975903002: Add a flag to dump IPC messages sent from the renderer to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup in external_ipc_dumper.cc Created 5 years, 10 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
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

Powered by Google App Engine
This is Rietveld 408576698