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

Unified Diff: ipc/ipc_channel_proxy.h

Issue 1270683002: ipc: Make a common subclass for Channel and ProxyChannel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More rebase errors. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.h
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index b01ccbc237408fe23cec60e06ee32ea46a28f07b..714bafddf89a471d76e421a0edfff797fbe8a6fe 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -13,6 +13,7 @@
#include "base/threading/non_thread_safe.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_endpoint.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -63,7 +64,7 @@ class SendCallbackHelper;
// |channel_lifetime_lock_| is used to protect it. The locking overhead is only
// paid if the underlying channel supports thread-safe |Send|.
//
-class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
+class IPC_EXPORT ChannelProxy : public Endpoint, public base::NonThreadSafe {
public:
#if defined(ENABLE_IPC_FUZZER)
// Interface for a filter to be imposed on outgoing messages which can
@@ -147,9 +148,9 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// Called to clear the pointer to the IPC task runner when it's going away.
void ClearIPCTaskRunner();
- // Get the process ID for the connected peer.
- // Returns base::kNullProcessId if the peer is not connected yet.
- base::ProcessId GetPeerPID() const { return context_->peer_pid_; }
+ // Endpoint overrides.
+ base::ProcessId GetPeerPID() const override;
+ void OnSetAttachmentBrokerEndpoint() override;
#if defined(OS_POSIX) && !defined(OS_NACL_SFI)
// Calls through to the underlying channel's methods.
@@ -157,8 +158,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
base::ScopedFD TakeClientFileDescriptor();
#endif
- void SetAttachmentBrokerEndpoint(bool is_endpoint);
-
protected:
class Context;
// A subclass uses this constructor if it needs to add more information
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698