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

Unified Diff: mojo/edk/embedder/embedder.cc

Issue 2019973002: [mojo-edk] Bind a child token to child launches and port reservations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder.cc
diff --git a/mojo/edk/embedder/embedder.cc b/mojo/edk/embedder/embedder.cc
index 5d7e3455e11ed76862f4448947056a18c37c475d..bd988e73c8e4db91429d109f0cbf033adc6d72a9 100644
--- a/mojo/edk/embedder/embedder.cc
+++ b/mojo/edk/embedder/embedder.cc
@@ -38,9 +38,16 @@ void SetMaxMessageSize(size_t bytes) {
}
void ChildProcessLaunched(base::ProcessHandle child_process,
- ScopedPlatformHandle server_pipe) {
+ ScopedPlatformHandle server_pipe,
+ const std::string& child_token) {
CHECK(internal::g_core);
- internal::g_core->AddChild(child_process, std::move(server_pipe));
+ internal::g_core->AddChild(child_process, std::move(server_pipe),
+ child_token);
+}
+
+void ChildProcessLaunchFailed(const std::string& child_token) {
+ CHECK(internal::g_core);
+ internal::g_core->ChildLaunchFailed(child_token);
}
void SetParentPipeHandle(ScopedPlatformHandle pipe) {
@@ -126,9 +133,10 @@ ScopedMessagePipeHandle CreateMessagePipe(
return internal::g_core->CreateMessagePipe(std::move(platform_handle));
}
-ScopedMessagePipeHandle CreateParentMessagePipe(const std::string& token) {
+ScopedMessagePipeHandle CreateParentMessagePipe(
+ const std::string& token, const std::string& child_token) {
CHECK(internal::g_process_delegate);
- return internal::g_core->CreateParentMessagePipe(token);
+ return internal::g_core->CreateParentMessagePipe(token, child_token);
}
ScopedMessagePipeHandle CreateChildMessagePipe(const std::string& token) {
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698