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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.h

Issue 580123004: Mojo: Remove knowledge of Channel, etc. from ProxyMessagePipeEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 72bc8f69ce92bd8ed5ad33775b1bd1727b3e96c1..48c3cb2584f5ed2f01d52b1b8ef3ffb07978153f 100644
--- a/mojo/system/proxy_message_pipe_endpoint.h
+++ b/mojo/system/proxy_message_pipe_endpoint.h
@@ -7,7 +7,6 @@
#include <stdint.h>
-#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "mojo/system/message_in_transit.h"
@@ -18,7 +17,6 @@
namespace mojo {
namespace system {
-class Channel;
class ChannelEndpoint;
class LocalMessagePipeEndpoint;
class MessagePipe;
@@ -55,43 +53,22 @@ class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
virtual Type GetType() const OVERRIDE;
virtual bool OnPeerClose() OVERRIDE;
virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) OVERRIDE;
- virtual void Attach(ChannelEndpoint* channel_endpoint,
- Channel* channel,
- MessageInTransit::EndpointId local_id) OVERRIDE;
- virtual bool Run(MessageInTransit::EndpointId remote_id) OVERRIDE;
+ virtual void Attach(ChannelEndpoint* channel_endpoint) OVERRIDE;
+ virtual bool Run() 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(); }
-
- bool is_running() const {
- return remote_id_ != MessageInTransit::kInvalidEndpointId;
- }
+ // TODO(vtl): Get rid of these.
+ bool is_attached() const { return !!channel_endpoint_.get(); }
+ bool is_running() const { return is_running_; }
// This should only be set if we're attached.
scoped_refptr<ChannelEndpoint> channel_endpoint_;
- // TODO(vtl): Remove this, local_id_, and remote_id_.
- // This should only be set if we're attached.
- scoped_refptr<Channel> channel_;
-
- // |local_id_| should be set to something other than
- // |MessageInTransit::kInvalidEndpointId| when we're attached.
- MessageInTransit::EndpointId local_id_;
-
- // |remote_id_| being set to anything other than
- // |MessageInTransit::kInvalidEndpointId| indicates that we're "running",
- // i.e., actively able to send messages. We should only ever be running if
- // we're attached.
- MessageInTransit::EndpointId remote_id_;
+ // TODO(vtl): Get rid of this.
+ bool is_running_;
bool is_peer_open_;
« 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