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

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 6334061: Clean up channel modes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up agl's comments Created 9 years, 10 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_channel.h ('k') | ipc/ipc_channel_posix.cc » ('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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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_POSIX_H_ 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_
6 #define IPC_IPC_CHANNEL_POSIX_H_ 6 #define IPC_IPC_CHANNEL_POSIX_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ipc/ipc_channel.h" 9 #include "ipc/ipc_channel.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool Connect(); 49 bool Connect();
50 void Close(); 50 void Close();
51 void set_listener(Listener* listener) { listener_ = listener; } 51 void set_listener(Listener* listener) { listener_ = listener; }
52 bool Send(Message* message); 52 bool Send(Message* message);
53 int GetClientFileDescriptor() const; 53 int GetClientFileDescriptor() const;
54 bool AcceptsConnections() const; 54 bool AcceptsConnections() const;
55 bool HasAcceptedConnection() const; 55 bool HasAcceptedConnection() const;
56 void ResetToAcceptingConnectionState(); 56 void ResetToAcceptingConnectionState();
57 57
58 private: 58 private:
59 bool CreatePipe(const IPC::ChannelHandle& channel_handle, 59 bool CreatePipe(const IPC::ChannelHandle& channel_handle);
60 bool uses_domain_sockets,
61 bool listening_socket);
62 60
63 bool ProcessIncomingMessages(); 61 bool ProcessIncomingMessages();
64 bool ProcessOutgoingMessages(); 62 bool ProcessOutgoingMessages();
65 63
66 bool AcceptConnection(); 64 bool AcceptConnection();
67 void ClosePipeOnError(); 65 void ClosePipeOnError();
68 void QueueHelloMessage(); 66 void QueueHelloMessage();
69 bool IsHelloMessage(const Message* m) const; 67 bool IsHelloMessage(const Message* m) const;
70 68
71 // MessageLoopForIO::Watcher implementation. 69 // MessageLoopForIO::Watcher implementation.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 145
148 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or 146 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or
149 // MODE_NAMED_CLIENT if you want to pass in your own socket. 147 // MODE_NAMED_CLIENT if you want to pass in your own socket.
150 // The standard size on linux is 108, mac is 104. To maintain consistency 148 // The standard size on linux is 108, mac is 104. To maintain consistency
151 // across platforms we standardize on the smaller value. 149 // across platforms we standardize on the smaller value.
152 static const size_t kMaxPipeNameLength = 104; 150 static const size_t kMaxPipeNameLength = 104;
153 151
154 } // namespace IPC 152 } // namespace IPC
155 153
156 #endif // IPC_IPC_CHANNEL_POSIX_H_ 154 #endif // IPC_IPC_CHANNEL_POSIX_H_
OLDNEW
« 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