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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 6711024: Example of how to interpose yourself in a message stream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
« chrome/tools/ipclist/ipcfuzz.cc ('K') | « ipc/ipc_channel_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« chrome/tools/ipclist/ipcfuzz.cc ('K') | « ipc/ipc_channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698