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

Unified Diff: mojo/edk/system/proxy_message_pipe_endpoint.cc

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 years 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
Index: mojo/edk/system/proxy_message_pipe_endpoint.cc
diff --git a/mojo/edk/system/proxy_message_pipe_endpoint.cc b/mojo/edk/system/proxy_message_pipe_endpoint.cc
index 4a954d982bad83d544459e098b537b17ab8108a8..5f0f2e95353e88294a22425ef60b51f3be7624d0 100644
--- a/mojo/edk/system/proxy_message_pipe_endpoint.cc
+++ b/mojo/edk/system/proxy_message_pipe_endpoint.cc
@@ -20,7 +20,15 @@ ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint(
}
ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() {
- DCHECK(!channel_endpoint_.get());
+ DCHECK(!channel_endpoint_);
+}
+
+scoped_refptr<ChannelEndpoint>
+ProxyMessagePipeEndpoint::ReleaseChannelEndpoint() {
+ DCHECK(channel_endpoint_);
+ scoped_refptr<ChannelEndpoint> rv;
+ rv.swap(channel_endpoint_);
+ return rv;
}
MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const {
@@ -37,7 +45,7 @@ bool ProxyMessagePipeEndpoint::OnPeerClose() {
// This case is handled in |Run()| (which will call us).
void ProxyMessagePipeEndpoint::EnqueueMessage(
scoped_ptr<MessageInTransit> message) {
- DCHECK(channel_endpoint_.get());
+ DCHECK(channel_endpoint_);
LOG_IF(WARNING, !channel_endpoint_->EnqueueMessage(message.Pass()))
<< "Failed to write enqueue message to channel";
}
@@ -47,7 +55,7 @@ void ProxyMessagePipeEndpoint::Close() {
}
void ProxyMessagePipeEndpoint::DetachIfNecessary() {
- if (channel_endpoint_.get()) {
+ if (channel_endpoint_) {
channel_endpoint_->DetachFromClient();
channel_endpoint_ = nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698