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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.cc

Issue 596363003: Mojo: Remove ProxyMessagePipeEndpoint::Run(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_mp_attach-x-move_paused_message_queue-x-del_pmpe_attach
Patch Set: remove unused vars 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 75ce34dd7dbe8c705a3fc00be623a5a8be45d5bc..ff8beb808348b86c661397cab41ed8d5c4818d85 100644
--- a/mojo/system/proxy_message_pipe_endpoint.cc
+++ b/mojo/system/proxy_message_pipe_endpoint.cc
@@ -16,21 +16,10 @@ namespace system {
ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
ChannelEndpoint* channel_endpoint)
- : channel_endpoint_(channel_endpoint),
- is_running_(false),
- is_peer_open_(true) {
-}
-
-ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
- ChannelEndpoint* channel_endpoint,
- bool is_peer_open)
- : channel_endpoint_(channel_endpoint),
- is_running_(false),
- is_peer_open_(is_peer_open) {
+ : channel_endpoint_(channel_endpoint) {
}
ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() {
- DCHECK(!is_running());
DCHECK(!is_attached());
}
@@ -39,19 +28,8 @@ MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const {
}
bool ProxyMessagePipeEndpoint::OnPeerClose() {
- DCHECK(is_peer_open_);
-
- is_peer_open_ = false;
-
- if (is_attached()) {
- if (!is_running()) {
- // If we're not running yet, we can't be destroyed yet, because we're
- // still waiting for the "run" message from the other side.
- return true;
- }
-
+ if (is_attached())
Detach();
- }
return false;
}
@@ -66,21 +44,6 @@ void ProxyMessagePipeEndpoint::EnqueueMessage(
<< "Failed to write enqueue message to channel";
}
-bool ProxyMessagePipeEndpoint::Run() {
- // Assertions about current state:
- DCHECK(is_attached());
- DCHECK(!is_running());
-
- is_running_ = true;
-
- if (is_peer_open_)
- return true; // Stay alive.
-
- // We were just waiting to die.
- Detach();
- return false;
-}
-
void ProxyMessagePipeEndpoint::OnRemove() {
Detach();
}
@@ -90,7 +53,6 @@ void ProxyMessagePipeEndpoint::Detach() {
channel_endpoint_->DetachFromMessagePipe();
channel_endpoint_ = nullptr;
- is_running_ = false;
}
} // namespace system
« 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