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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 9968111: Make IPC channels track their peer process ID (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
===================================================================
--- ipc/ipc_channel_posix.cc (revision 130443)
+++ ipc/ipc_channel_posix.cc (working copy)
@@ -303,6 +303,7 @@
Mode mode, Listener* listener)
: ChannelReader(listener),
mode_(mode),
+ peer_pid_(base::kNullProcessId),
is_blocked_on_write_(false),
waiting_connect_(true),
message_send_bytes_written_(0),
@@ -1081,6 +1082,7 @@
CHECK(descriptor.auto_close);
}
#endif // IPC_USES_READWRITE
+ peer_pid_ = pid;
listener()->OnChannelConnected(pid);
}
@@ -1128,6 +1130,10 @@
channel_impl_->set_listener(listener);
}
+base::ProcessId Channel::peer_pid() const {
+ return channel_impl_->peer_pid();
+}
+
bool Channel::Send(Message* message) {
return channel_impl_->Send(message);
}
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698