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

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: 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_proxy.h ('k') | ipc/ipc_endpoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 2398b516419ac265c523863c13ad6ca0e696ef07..5a9c3e3dd807fa2d651a51096e7ba0fea975fa0d 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) {
@@ -489,6 +489,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().
@@ -511,10 +519,6 @@ base::ScopedFD ChannelProxy::TakeClientFileDescriptor() {
}
#endif
-void ChannelProxy::SetAttachmentBrokerEndpoint(bool is_endpoint) {
- context()->set_attachment_broker_endpoint(is_endpoint);
-}
-
void ChannelProxy::OnChannelInit() {
}
« no previous file with comments | « 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