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

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

Issue 2738853002: Connections now take a ConnectionParams instead of a pipe handle. (Closed)
Patch Set: Fix Win release build. Created 3 years, 9 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/edk/system/core.h ('k') | mojo/edk/system/node_channel.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 a5e432b8a749f3a2ddc937bcf5a86f392db1baa6..1e0bf4e1dfea36ee749036e3cf160316f9d6437e 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -172,12 +172,11 @@ void Core::SetDefaultProcessErrorCallback(
}
void Core::AddChild(base::ProcessHandle process_handle,
- ScopedPlatformHandle platform_handle,
+ ConnectionParams connection_params,
const std::string& child_token,
const ProcessErrorCallback& process_error_callback) {
GetNodeController()->ConnectToChild(process_handle,
- std::move(platform_handle),
- child_token,
+ std::move(connection_params), child_token,
process_error_callback);
}
@@ -194,7 +193,9 @@ ScopedMessagePipeHandle Core::ConnectToPeerProcess(
GetNodeController()->node()->CreatePortPair(&port0, &port1);
MojoHandle handle = AddDispatcher(new MessagePipeDispatcher(
GetNodeController(), port0, kUnknownPipeIdForDebug, 0));
- GetNodeController()->ConnectToPeer(std::move(pipe_handle), port1, peer_token);
+ ConnectionParams connection_params(std::move(pipe_handle));
+ GetNodeController()->ConnectToPeer(std::move(connection_params), port1,
+ peer_token);
return ScopedMessagePipeHandle(MessagePipeHandle(handle));
}
@@ -202,8 +203,8 @@ void Core::ClosePeerConnection(const std::string& peer_token) {
GetNodeController()->ClosePeerConnection(peer_token);
}
-void Core::InitChild(ScopedPlatformHandle platform_handle) {
- GetNodeController()->ConnectToParent(std::move(platform_handle));
+void Core::InitChild(ConnectionParams connection_params) {
+ GetNodeController()->ConnectToParent(std::move(connection_params));
}
void Core::SetMachPortProvider(base::PortProvider* port_provider) {
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/node_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698