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

Unified Diff: mojo/public/cpp/bindings/interface_request.h

Issue 2646853003: Mojo C++ bindings: Simplify associated interface API. (Closed)
Patch Set: . Created 3 years, 10 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
Index: mojo/public/cpp/bindings/interface_request.h
diff --git a/mojo/public/cpp/bindings/interface_request.h b/mojo/public/cpp/bindings/interface_request.h
index db102368b86be2837653e96a9f738e79e237fd90..29d883615e6a8638fa7f89f814d1fa5b5164a67a 100644
--- a/mojo/public/cpp/bindings/interface_request.h
+++ b/mojo/public/cpp/bindings/interface_request.h
@@ -86,12 +86,9 @@ class InterfaceRequest {
if (!handle_.is_valid())
return;
- base::Optional<DisconnectReason> reason;
- reason.emplace(custom_reason, description);
-
Message message =
PipeControlMessageProxy::ConstructPeerEndpointClosedMessage(
- kMasterInterfaceId, reason);
+ kMasterInterfaceId, DisconnectReason(custom_reason, description));
MojoResult result = WriteMessageNew(
handle_.get(), message.TakeMojoMessage(), MOJO_WRITE_MESSAGE_FLAG_NONE);
DCHECK_EQ(MOJO_RESULT_OK, result);
« no previous file with comments | « mojo/public/cpp/bindings/interface_endpoint_client.h ('k') | mojo/public/cpp/bindings/lib/associated_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698