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

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 659243002: Non-SFI Mode: Build ipc/ library by PNaCl toolchain for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // for more connections. 78 // for more connections.
79 void ResetToAcceptingConnectionState(); 79 void ResetToAcceptingConnectionState();
80 80
81 // Returns true if the peer process' effective user id can be determined, in 81 // Returns true if the peer process' effective user id can be determined, in
82 // which case the supplied peer_euid is updated with it. 82 // which case the supplied peer_euid is updated with it.
83 bool GetPeerEuid(uid_t* peer_euid) const; 83 bool GetPeerEuid(uid_t* peer_euid) const;
84 84
85 void CloseClientFileDescriptor(); 85 void CloseClientFileDescriptor();
86 86
87 static bool IsNamedServerInitialized(const std::string& channel_id); 87 static bool IsNamedServerInitialized(const std::string& channel_id);
88 #if defined(OS_LINUX) 88 #if defined(OS_LINUX) || defined(__native_client_nonsfi__)
Mark Seaborn 2014/10/23 03:33:48 If I understand correctly, these changes to the PI
hidehiko 2014/10/23 14:19:10 Ok, reverted. But we need to solve the pid issue.
89 static void SetGlobalPid(int pid); 89 static void SetGlobalPid(int pid);
90 #endif // OS_LINUX 90 #endif
91 91
92 private: 92 private:
93 bool CreatePipe(const IPC::ChannelHandle& channel_handle); 93 bool CreatePipe(const IPC::ChannelHandle& channel_handle);
94 94
95 bool ProcessOutgoingMessages(); 95 bool ProcessOutgoingMessages();
96 96
97 bool AcceptConnection(); 97 bool AcceptConnection();
98 void ClosePipeOnError(); 98 void ClosePipeOnError();
99 int GetHelloMessageProcId() const; 99 int GetHelloMessageProcId() const;
100 void QueueHelloMessage(); 100 void QueueHelloMessage();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 #if defined(OS_MACOSX) 207 #if defined(OS_MACOSX)
208 // On OSX, sent FDs must not be closed until we get an ack. 208 // On OSX, sent FDs must not be closed until we get an ack.
209 // Keep track of sent FDs here to make sure the remote is not 209 // Keep track of sent FDs here to make sure the remote is not
210 // trying to bamboozle us. 210 // trying to bamboozle us.
211 std::set<int> fds_to_close_; 211 std::set<int> fds_to_close_;
212 #endif 212 #endif
213 213
214 // True if we are responsible for unlinking the unix domain socket file. 214 // True if we are responsible for unlinking the unix domain socket file.
215 bool must_unlink_; 215 bool must_unlink_;
216 216
217 #if defined(OS_LINUX) 217 #if defined(OS_LINUX) || defined(__native_client_nonsfi__)
218 // If non-zero, overrides the process ID sent in the hello message. 218 // If non-zero, overrides the process ID sent in the hello message.
219 static int global_pid_; 219 static int global_pid_;
220 #endif // OS_LINUX 220 #endif
221 221
222 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); 222 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix);
223 }; 223 };
224 224
225 } // namespace IPC 225 } // namespace IPC
226 226
227 #endif // IPC_IPC_CHANNEL_POSIX_H_ 227 #endif // IPC_IPC_CHANNEL_POSIX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698