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

Side by Side Diff: mojo/edk/system/proxy_message_pipe_endpoint.cc

Issue 738453003: Add a ChannelEndpointClient abstraction. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review comments Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/message_pipe.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/edk/system/proxy_message_pipe_endpoint.h" 5 #include "mojo/edk/system/proxy_message_pipe_endpoint.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/system/channel_endpoint.h" 10 #include "mojo/edk/system/channel_endpoint.h"
(...skipping 30 matching lines...) Expand all
41 LOG_IF(WARNING, !channel_endpoint_->EnqueueMessage(message.Pass())) 41 LOG_IF(WARNING, !channel_endpoint_->EnqueueMessage(message.Pass()))
42 << "Failed to write enqueue message to channel"; 42 << "Failed to write enqueue message to channel";
43 } 43 }
44 44
45 void ProxyMessagePipeEndpoint::Close() { 45 void ProxyMessagePipeEndpoint::Close() {
46 DetachIfNecessary(); 46 DetachIfNecessary();
47 } 47 }
48 48
49 void ProxyMessagePipeEndpoint::DetachIfNecessary() { 49 void ProxyMessagePipeEndpoint::DetachIfNecessary() {
50 if (channel_endpoint_.get()) { 50 if (channel_endpoint_.get()) {
51 channel_endpoint_->DetachFromMessagePipe(); 51 channel_endpoint_->DetachFromClient();
52 channel_endpoint_ = nullptr; 52 channel_endpoint_ = nullptr;
53 } 53 }
54 } 54 }
55 55
56 } // namespace system 56 } // namespace system
57 } // namespace mojo 57 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698