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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.h

Issue 240133005: Mojo: Make some attempts towards fixing remote message pipe closure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some locking issues Created 6 years, 8 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/message_pipe_endpoint.cc ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/proxy_message_pipe_endpoint.h
diff --git a/mojo/system/proxy_message_pipe_endpoint.h b/mojo/system/proxy_message_pipe_endpoint.h
index 7d62b9b79e16b8ac98c75eb566df8c7d2d616471..28b634d90606b7fd95c55897990ad6d656294a94 100644
--- a/mojo/system/proxy_message_pipe_endpoint.h
+++ b/mojo/system/proxy_message_pipe_endpoint.h
@@ -53,14 +53,22 @@ class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
// |MessagePipeEndpoint| implementation:
virtual Type GetType() const OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void OnPeerClose() OVERRIDE;
+ virtual bool OnPeerClose() OVERRIDE;
virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) OVERRIDE;
virtual void Attach(scoped_refptr<Channel> channel,
MessageInTransit::EndpointId local_id) OVERRIDE;
- virtual void Run(MessageInTransit::EndpointId remote_id) OVERRIDE;
+ virtual bool Run(MessageInTransit::EndpointId remote_id) OVERRIDE;
+ virtual void OnRemove() OVERRIDE;
private:
+ void Detach();
+
+#ifdef NDEBUG
+ void AssertConsistentState() const {}
+#else
+ void AssertConsistentState() const;
+#endif
+
bool is_attached() const {
return !!channel_.get();
}
@@ -69,12 +77,6 @@ class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
return remote_id_ != MessageInTransit::kInvalidEndpointId;
}
-#ifdef NDEBUG
- void AssertConsistentState() const {}
-#else
- void AssertConsistentState() const;
-#endif
-
// This should only be set if we're attached.
scoped_refptr<Channel> channel_;
@@ -88,7 +90,6 @@ class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
// we're attached.
MessageInTransit::EndpointId remote_id_;
- bool is_open_;
bool is_peer_open_;
// This queue is only used while we're detached, to store messages while we're
« no previous file with comments | « mojo/system/message_pipe_endpoint.cc ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698