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

Unified Diff: ipc/ipc_channel_posix.h

Issue 320433002: IPC::Channel: Reduce POSIX specific API surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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.h ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.h
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index ae2de72f7fe3fa582a90ff379efb4b043b68f1ad..fc7991d0ba2c0778d7c8168d93f5504390338f95 100644
--- a/ipc/ipc_channel_posix.h
+++ b/ipc/ipc_channel_posix.h
@@ -53,9 +53,11 @@ class ChannelPosix : public Channel,
public internal::ChannelReader,
public base::MessageLoopForIO::Watcher {
public:
- // Mirror methods of Channel, see ipc_channel.h for description.
- ChannelPosix(const IPC::ChannelHandle& channel_handle, Mode mode,
- Listener* listener);
+ // Implementation of IPC::Channel::Create()
+ static scoped_ptr<ChannelPosix> Create(
jam 2014/06/05 20:45:32 I dont think a factory method for IPC::ChannelPosi
gmorrita 2014/06/05 22:05:25 OK, removed the Create() and use the ctor directly
+ const IPC::ChannelHandle& channel_handle, Mode mode,
+ Listener* listener);
+
virtual ~ChannelPosix();
// Channel implementation
@@ -65,10 +67,21 @@ class ChannelPosix : public Channel,
virtual base::ProcessId GetPeerPID() const OVERRIDE;
virtual int GetClientFileDescriptor() const OVERRIDE;
virtual int TakeClientFileDescriptor() OVERRIDE;
- virtual bool AcceptsConnections() const OVERRIDE;
- virtual bool HasAcceptedConnection() const OVERRIDE;
- virtual bool GetPeerEuid(uid_t* peer_euid) const OVERRIDE;
- virtual void ResetToAcceptingConnectionState() OVERRIDE;
+
+ // Returns true if the channel supports listening for connections.
+ bool AcceptsConnections() const;
+
+ // Returns true if the channel supports listening for connections and is
+ // currently connected.
+ bool HasAcceptedConnection() const;
+
+ // Closes any currently connected socket, and returns to a listening state
+ // for more connections.
+ void ResetToAcceptingConnectionState();
+
+ // Returns true if the peer process' effective user id can be determined, in
+ // which case the supplied peer_euid is updated with it.
+ bool GetPeerEuid(uid_t* peer_euid) const;
void CloseClientFileDescriptor();
@@ -78,6 +91,9 @@ class ChannelPosix : public Channel,
#endif // OS_LINUX
private:
+ ChannelPosix(const IPC::ChannelHandle& channel_handle, Mode mode,
+ Listener* listener);
+
bool CreatePipe(const IPC::ChannelHandle& channel_handle);
bool ProcessOutgoingMessages();
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698