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

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

Issue 2738853002: Connections now take a ConnectionParams instead of a pipe handle. (Closed)
Patch Set: Fix Win compile 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
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index a5e432b8a749f3a2ddc937bcf5a86f392db1baa6..a6c252ca0b4ed22ccc31acc3fbf52b8150320583 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,
+ ConnectionParam connection_param,
const std::string& child_token,
const ProcessErrorCallback& process_error_callback) {
GetNodeController()->ConnectToChild(process_handle,
- std::move(platform_handle),
- child_token,
+ std::move(connection_param), 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);
+ ConnectionParam connection_param(std::move(pipe_handle));
+ GetNodeController()->ConnectToPeer(std::move(connection_param), 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(ConnectionParam connection_param) {
+ GetNodeController()->ConnectToParent(std::move(connection_param));
}
void Core::SetMachPortProvider(base::PortProvider* port_provider) {

Powered by Google App Engine
This is Rietveld 408576698