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

Side by Side Diff: ipc/unix_domain_socket_util.h

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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.cc ('k') | ipc/unix_domain_socket_util.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UNIX_DOMAIN_SOCKET_UTIL_H_ 5 #ifndef IPC_UNIX_DOMAIN_SOCKET_UTIL_H_
6 #define IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ 6 #define IPC_UNIX_DOMAIN_SOCKET_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // represented by |peer_fd| shares the same EUID as this process. 42 // represented by |peer_fd| shares the same EUID as this process.
43 IPC_EXPORT bool IsPeerAuthorized(int peer_fd); 43 IPC_EXPORT bool IsPeerAuthorized(int peer_fd);
44 44
45 // Accepts a client attempting to connect to |server_listen_fd|, storing the 45 // Accepts a client attempting to connect to |server_listen_fd|, storing the
46 // new file descriptor for the connection in |server_socket|. 46 // new file descriptor for the connection in |server_socket|.
47 // 47 //
48 // Returns false if |server_listen_fd| encounters an unrecoverable error. 48 // Returns false if |server_listen_fd| encounters an unrecoverable error.
49 // Returns true if it's valid to keep listening on |server_listen_fd|. In this 49 // Returns true if it's valid to keep listening on |server_listen_fd|. In this
50 // case, it's possible that a connection wasn't successfully established; then, 50 // case, it's possible that a connection wasn't successfully established; then,
51 // |server_socket| will be set to -1. 51 // |server_socket| will be set to -1.
52 IPC_EXPORT bool ServerAcceptConnection(int server_listen_fd, 52 IPC_EXPORT bool ServerOnConnect(int server_listen_fd,
53 int* server_socket); 53 int* server_socket);
54 54
55 // The maximum length of the name of a socket for MODE_NAMED_SERVER or 55 // The maximum length of the name of a socket for MODE_NAMED_SERVER or
56 // MODE_NAMED_CLIENT if you want to pass in your own socket. 56 // MODE_NAMED_CLIENT if you want to pass in your own socket.
57 // The standard size on linux is 108, mac is 104. To maintain consistency 57 // The standard size on linux is 108, mac is 104. To maintain consistency
58 // across platforms we standardize on the smaller value. 58 // across platforms we standardize on the smaller value.
59 static const size_t kMaxSocketNameLength = 104; 59 static const size_t kMaxSocketNameLength = 104;
60 60
61 } // namespace IPC 61 } // namespace IPC
62 62
63 #endif // IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ 63 #endif // IPC_UNIX_DOMAIN_SOCKET_UTIL_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/unix_domain_socket_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698