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

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 12761003: Revert 187233 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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_channel_factory.cc ('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) 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_POSIX_H_ 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_
6 #define IPC_IPC_CHANNEL_POSIX_H_ 6 #define IPC_IPC_CHANNEL_POSIX_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 #include <sys/socket.h> // for CMSG macros 10 #include <sys/socket.h> // for CMSG macros
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 Listener* listener); 56 Listener* listener);
57 virtual ~ChannelImpl(); 57 virtual ~ChannelImpl();
58 bool Connect(); 58 bool Connect();
59 void Close(); 59 void Close();
60 bool Send(Message* message); 60 bool Send(Message* message);
61 int GetClientFileDescriptor(); 61 int GetClientFileDescriptor();
62 int TakeClientFileDescriptor(); 62 int TakeClientFileDescriptor();
63 void CloseClientFileDescriptor(); 63 void CloseClientFileDescriptor();
64 bool AcceptsConnections() const; 64 bool AcceptsConnections() const;
65 bool HasAcceptedConnection() const; 65 bool HasAcceptedConnection() const;
66 bool GetPeerEuid(uid_t* peer_euid) const; 66 bool GetClientEuid(uid_t* client_euid) const;
67 void ResetToAcceptingConnectionState(); 67 void ResetToAcceptingConnectionState();
68 base::ProcessId peer_pid() const { return peer_pid_; } 68 base::ProcessId peer_pid() const { return peer_pid_; }
69 static bool IsNamedServerInitialized(const std::string& channel_id); 69 static bool IsNamedServerInitialized(const std::string& channel_id);
70 #if defined(OS_LINUX) 70 #if defined(OS_LINUX)
71 static void SetGlobalPid(int pid); 71 static void SetGlobalPid(int pid);
72 #endif // OS_LINUX 72 #endif // OS_LINUX
73 73
74 private: 74 private:
75 bool CreatePipe(const IPC::ChannelHandle& channel_handle); 75 bool CreatePipe(const IPC::ChannelHandle& channel_handle);
76 76
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 bool must_unlink_; 187 bool must_unlink_;
188 188
189 #if defined(OS_LINUX) 189 #if defined(OS_LINUX)
190 // If non-zero, overrides the process ID sent in the hello message. 190 // If non-zero, overrides the process ID sent in the hello message.
191 static int global_pid_; 191 static int global_pid_;
192 #endif // OS_LINUX 192 #endif // OS_LINUX
193 193
194 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl); 194 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl);
195 }; 195 };
196 196
197 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or
198 // MODE_NAMED_CLIENT if you want to pass in your own socket.
199 // The standard size on linux is 108, mac is 104. To maintain consistency
200 // across platforms we standardize on the smaller value.
201 static const size_t kMaxPipeNameLength = 104;
202
197 } // namespace IPC 203 } // namespace IPC
198 204
199 #endif // IPC_IPC_CHANNEL_POSIX_H_ 205 #endif // IPC_IPC_CHANNEL_POSIX_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_factory.cc ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698