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

Side by Side Diff: ipc/ipc_channel_posix.cc

Issue 601563002: Remove IPC::Channel::TakePipeHandle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Nacl build error Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_posix.h" 5 #include "ipc/ipc_channel_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 } 1047 }
1048 1048
1049 base::ProcessId ChannelPosix::GetPeerPID() const { 1049 base::ProcessId ChannelPosix::GetPeerPID() const {
1050 return peer_pid_; 1050 return peer_pid_;
1051 } 1051 }
1052 1052
1053 base::ProcessId ChannelPosix::GetSelfPID() const { 1053 base::ProcessId ChannelPosix::GetSelfPID() const {
1054 return GetHelloMessageProcId(); 1054 return GetHelloMessageProcId();
1055 } 1055 }
1056 1056
1057 ChannelHandle ChannelPosix::TakePipeHandle() {
1058 ChannelHandle handle = ChannelHandle(pipe_name_,
1059 base::FileDescriptor(pipe_, false));
1060 pipe_ = -1;
1061 return handle;
1062 }
1063
1064 //------------------------------------------------------------------------------ 1057 //------------------------------------------------------------------------------
1065 // Channel's methods 1058 // Channel's methods
1066 1059
1067 // static 1060 // static
1068 scoped_ptr<Channel> Channel::Create( 1061 scoped_ptr<Channel> Channel::Create(
1069 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { 1062 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
1070 return make_scoped_ptr(new ChannelPosix( 1063 return make_scoped_ptr(new ChannelPosix(
1071 channel_handle, mode, listener)).PassAs<Channel>(); 1064 channel_handle, mode, listener)).PassAs<Channel>();
1072 } 1065 }
1073 1066
(...skipping 16 matching lines...) Expand all
1090 } 1083 }
1091 1084
1092 #if defined(OS_LINUX) 1085 #if defined(OS_LINUX)
1093 // static 1086 // static
1094 void Channel::SetGlobalPid(int pid) { 1087 void Channel::SetGlobalPid(int pid) {
1095 ChannelPosix::SetGlobalPid(pid); 1088 ChannelPosix::SetGlobalPid(pid);
1096 } 1089 }
1097 #endif // OS_LINUX 1090 #endif // OS_LINUX
1098 1091
1099 } // namespace IPC 1092 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698