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

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

Issue 2466433002: Add mojo::edk::ClosePeerConnection. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/node_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index d2a421ebeeee474cde11153c9f339cc1f8bac05d..f37d42ef3ec3fdd658a29b5511ee67ee3a576329 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -188,16 +188,21 @@ void Core::ChildLaunchFailed(const std::string& child_token) {
}
ScopedMessagePipeHandle Core::ConnectToPeerProcess(
- ScopedPlatformHandle pipe_handle) {
+ ScopedPlatformHandle pipe_handle,
+ const std::string& peer_token) {
RequestContext request_context;
ports::PortRef port0, port1;
GetNodeController()->node()->CreatePortPair(&port0, &port1);
MojoHandle handle = AddDispatcher(new MessagePipeDispatcher(
GetNodeController(), port0, kUnknownPipeIdForDebug, 0));
- GetNodeController()->ConnectToPeer(std::move(pipe_handle), port1);
+ GetNodeController()->ConnectToPeer(std::move(pipe_handle), port1, peer_token);
return ScopedMessagePipeHandle(MessagePipeHandle(handle));
}
+void Core::ClosePeerConnection(const std::string& peer_token) {
+ GetNodeController()->ClosePeerConnection(peer_token);
+}
+
void Core::InitChild(ScopedPlatformHandle platform_handle) {
GetNodeController()->ConnectToParent(std::move(platform_handle));
}
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/node_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698