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

Side by Side Diff: ipc/ipc_channel_proxy.h

Issue 12386010: Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: un-revert fix to tests 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_posix_unittest.cc ('k') | ipc/ipc_channel_proxy.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_PROXY_H_ 5 #ifndef IPC_IPC_CHANNEL_PROXY_H_
6 #define IPC_IPC_CHANNEL_PROXY_H_ 6 #define IPC_IPC_CHANNEL_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void ClearIPCTaskRunner(); 174 void ClearIPCTaskRunner();
175 175
176 // Get the process ID for the connected peer. 176 // Get the process ID for the connected peer.
177 // Returns base::kNullProcessId if the peer is not connected yet. 177 // Returns base::kNullProcessId if the peer is not connected yet.
178 base::ProcessId peer_pid() const { return context_->peer_pid_; } 178 base::ProcessId peer_pid() const { return context_->peer_pid_; }
179 179
180 #if defined(OS_POSIX) && !defined(OS_NACL) 180 #if defined(OS_POSIX) && !defined(OS_NACL)
181 // Calls through to the underlying channel's methods. 181 // Calls through to the underlying channel's methods.
182 int GetClientFileDescriptor(); 182 int GetClientFileDescriptor();
183 int TakeClientFileDescriptor(); 183 int TakeClientFileDescriptor();
184 bool GetClientEuid(uid_t* client_euid) const; 184 bool GetPeerEuid(uid_t* peer_euid) const;
185 #endif // defined(OS_POSIX) 185 #endif // defined(OS_POSIX)
186 186
187 protected: 187 protected:
188 class Context; 188 class Context;
189 // A subclass uses this constructor if it needs to add more information 189 // A subclass uses this constructor if it needs to add more information
190 // to the internal state. 190 // to the internal state.
191 ChannelProxy(Context* context); 191 ChannelProxy(Context* context);
192 192
193 // Used internally to hold state that is referenced on the IPC thread. 193 // Used internally to hold state that is referenced on the IPC thread.
194 class Context : public base::RefCountedThreadSafe<Context>, 194 class Context : public base::RefCountedThreadSafe<Context>,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 OutgoingMessageFilter* outgoing_message_filter_; 285 OutgoingMessageFilter* outgoing_message_filter_;
286 286
287 // Whether the channel has been initialized. 287 // Whether the channel has been initialized.
288 bool did_init_; 288 bool did_init_;
289 }; 289 };
290 290
291 } // namespace IPC 291 } // namespace IPC
292 292
293 #endif // IPC_IPC_CHANNEL_PROXY_H_ 293 #endif // IPC_IPC_CHANNEL_PROXY_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698