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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.cc

Issue 588193004: Mojo: Have |ProxyMessagePipeEndpoint|s constructed with a |ChannelEndpoint|. (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/proxy_message_pipe_endpoint.h ('k') | mojo/system/remote_message_pipe_unittest.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.cc
diff --git a/mojo/system/proxy_message_pipe_endpoint.cc b/mojo/system/proxy_message_pipe_endpoint.cc
index f3a3b34ba99c21582931cb810d5c3e1206f0dc7e..a52099f8d0b9d40c1f8b10029ecc98d942fb522a 100644
--- a/mojo/system/proxy_message_pipe_endpoint.cc
+++ b/mojo/system/proxy_message_pipe_endpoint.cc
@@ -14,14 +14,20 @@
namespace mojo {
namespace system {
-ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint()
- : is_running_(false), is_peer_open_(true) {
+ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
+ ChannelEndpoint* channel_endpoint)
+ : channel_endpoint_(channel_endpoint),
+ is_running_(false),
+ is_peer_open_(true) {
}
ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
+ ChannelEndpoint* channel_endpoint,
LocalMessagePipeEndpoint* local_message_pipe_endpoint,
bool is_peer_open)
- : is_running_(false), is_peer_open_(is_peer_open) {
+ : channel_endpoint_(channel_endpoint),
+ is_running_(false),
+ is_peer_open_(is_peer_open) {
paused_message_queue_.Swap(local_message_pipe_endpoint->message_queue());
local_message_pipe_endpoint->Close();
}
@@ -72,12 +78,6 @@ void ProxyMessagePipeEndpoint::EnqueueMessage(
}
}
-void ProxyMessagePipeEndpoint::Attach(ChannelEndpoint* channel_endpoint) {
- DCHECK(channel_endpoint);
- DCHECK(!is_attached());
- channel_endpoint_ = channel_endpoint;
-}
-
bool ProxyMessagePipeEndpoint::Run() {
// Assertions about current state:
DCHECK(is_attached());
« no previous file with comments | « mojo/system/proxy_message_pipe_endpoint.h ('k') | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698