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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 382333002: Introduce ChannelMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 8ddf73a2442349eb2f2576b9922e7a4b91616ea1..ac9de554657771704fe9d7a58bbad53c5587522d 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -747,7 +747,7 @@ void ChannelPosix::ClosePipeOnError() {
}
}
-int ChannelPosix::GetHelloMessageProcId() {
+int ChannelPosix::GetHelloMessageProcId() const {
int pid = base::GetCurrentProcId();
#if defined(OS_LINUX)
// Our process may be in a sandbox with a separate PID namespace.
@@ -1050,6 +1050,17 @@ base::ProcessId ChannelPosix::GetPeerPID() const {
return peer_pid_;
}
+base::ProcessId ChannelPosix::GetSelfPID() const {
+ return GetHelloMessageProcId();
+}
+
+ChannelHandle ChannelPosix::TakePipeHandle() {
+ ChannelHandle handle = ChannelHandle(pipe_name_,
+ base::FileDescriptor(pipe_, false));
+ pipe_ = -1;
+ return handle;
+}
+
//------------------------------------------------------------------------------
// Channel's methods
« ipc/ipc_channel.h ('K') | « 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