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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 1270683002: ipc: Make a common subclass for Channel and ProxyChannel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BUILD.gn. 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
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 44fa42b815fb96f78cb027ceb638d0e3bb5e277d..5f2d98ae84d41c20f42d3846d2065e1bc47a920b 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -59,7 +59,7 @@ void ChannelProxy::Context::CreateChannel(scoped_ptr<ChannelFactory> factory) {
channel_id_ = factory->GetName();
channel_ = factory->BuildChannel(this);
channel_send_thread_safe_ = channel_->IsSendThreadSafe();
- channel_->set_attachment_broker_endpoint(attachment_broker_endpoint_);
+ channel_->SetAttachmentBrokerEndpoint(attachment_broker_endpoint_);
}
bool ChannelProxy::Context::TryFilters(const Message& message) {
@@ -484,6 +484,14 @@ void ChannelProxy::ClearIPCTaskRunner() {
context()->ClearIPCTaskRunner();
}
+base::ProcessId ChannelProxy::GetPeerPID() const {
+ return context_->peer_pid_;
+}
+
+void ChannelProxy::OnSetAttachmentBrokerEndpoint() {
+ context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint());
+}
+
#if defined(OS_POSIX) && !defined(OS_NACL_SFI)
// See the TODO regarding lazy initialization of the channel in
// ChannelProxy::Init().
@@ -506,10 +514,6 @@ base::ScopedFD ChannelProxy::TakeClientFileDescriptor() {
}
#endif
-void ChannelProxy::SetAttachmentBrokerEndpoint(bool is_endpoint) {
- context()->set_attachment_broker_endpoint(is_endpoint);
-}
-
//-----------------------------------------------------------------------------
} // namespace IPC
« ipc/ipc_channel_proxy.h ('K') | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698