OLD | NEW |
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 Loading... |
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 GetPeerEuid(uid_t* peer_euid) const; | 184 bool GetClientEuid(uid_t* client_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 Loading... |
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_ |
OLD | NEW |