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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.cc

Issue 604443002: Mojo: Remove ProxyMessagePipeEndpoint::OnRemove(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_pmpe_run-x-del_mp_attach-x-move_paused_message_queue-x-del_pmpe_attach
Patch Set: rebased Created 6 years, 3 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 | « mojo/system/proxy_message_pipe_endpoint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/proxy_message_pipe_endpoint.cc
diff --git a/mojo/system/proxy_message_pipe_endpoint.cc b/mojo/system/proxy_message_pipe_endpoint.cc
index ff8beb808348b86c661397cab41ed8d5c4818d85..a14fa965b136a6e6ae68a2a1bc4e1b3cc6f02f5a 100644
--- a/mojo/system/proxy_message_pipe_endpoint.cc
+++ b/mojo/system/proxy_message_pipe_endpoint.cc
@@ -20,7 +20,7 @@ ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
}
ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() {
- DCHECK(!is_attached());
+ channel_endpoint_->DetachFromMessagePipe();
}
MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const {
@@ -28,9 +28,6 @@ MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const {
}
bool ProxyMessagePipeEndpoint::OnPeerClose() {
- if (is_attached())
- Detach();
-
return false;
}
@@ -44,16 +41,5 @@ void ProxyMessagePipeEndpoint::EnqueueMessage(
<< "Failed to write enqueue message to channel";
}
-void ProxyMessagePipeEndpoint::OnRemove() {
- Detach();
-}
-
-void ProxyMessagePipeEndpoint::Detach() {
- DCHECK(is_attached());
-
- channel_endpoint_->DetachFromMessagePipe();
- channel_endpoint_ = nullptr;
-}
-
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/system/proxy_message_pipe_endpoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698