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

Side by Side Diff: ipc/ipc_channel.h

Issue 12386010: Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: un-revert fix to tests Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc.gypi ('k') | ipc/ipc_channel_factory.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 #ifndef IPC_IPC_CHANNEL_H_ 5 #ifndef IPC_IPC_CHANNEL_H_
6 #define IPC_IPC_CHANNEL_H_ 6 #define IPC_IPC_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // at a time. 160 // at a time.
161 161
162 // Returns true if the channel supports listening for connections. 162 // Returns true if the channel supports listening for connections.
163 bool AcceptsConnections() const; 163 bool AcceptsConnections() const;
164 164
165 // Returns true if the channel supports listening for connections and is 165 // Returns true if the channel supports listening for connections and is
166 // currently connected. 166 // currently connected.
167 bool HasAcceptedConnection() const; 167 bool HasAcceptedConnection() const;
168 168
169 // Returns true if the peer process' effective user id can be determined, in 169 // Returns true if the peer process' effective user id can be determined, in
170 // which case the supplied client_euid is updated with it. 170 // which case the supplied peer_euid is updated with it.
171 bool GetClientEuid(uid_t* client_euid) const; 171 bool GetPeerEuid(uid_t* peer_euid) const;
172 172
173 // Closes any currently connected socket, and returns to a listening state 173 // Closes any currently connected socket, and returns to a listening state
174 // for more connections. 174 // for more connections.
175 void ResetToAcceptingConnectionState(); 175 void ResetToAcceptingConnectionState();
176 #endif // defined(OS_POSIX) && !defined(OS_NACL) 176 #endif // defined(OS_POSIX) && !defined(OS_NACL)
177 177
178 // Returns true if a named server channel is initialized on the given channel 178 // Returns true if a named server channel is initialized on the given channel
179 // ID. Even if true, the server may have already accepted a connection. 179 // ID. Even if true, the server may have already accepted a connection.
180 static bool IsNamedServerInitialized(const std::string& channel_id); 180 static bool IsNamedServerInitialized(const std::string& channel_id);
181 181
(...skipping 24 matching lines...) Expand all
206 206
207 private: 207 private:
208 // PIMPL to which all channel calls are delegated. 208 // PIMPL to which all channel calls are delegated.
209 class ChannelImpl; 209 class ChannelImpl;
210 ChannelImpl *channel_impl_; 210 ChannelImpl *channel_impl_;
211 }; 211 };
212 212
213 } // namespace IPC 213 } // namespace IPC
214 214
215 #endif // IPC_IPC_CHANNEL_H_ 215 #endif // IPC_IPC_CHANNEL_H_
OLDNEW
« no previous file with comments | « ipc/ipc.gypi ('k') | ipc/ipc_channel_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698