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

Unified Diff: mojo/shell/runner/child/runner_connection.cc

Issue 1675603002: [mojo-edk] Simplify multiprocess pipe bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix some callers to work with sync APIs Created 4 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
« no previous file with comments | « mojo/edk/system/remote_message_pipe_bootstrap.cc ('k') | mojo/shell/runner/host/child_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/runner/child/runner_connection.cc
diff --git a/mojo/shell/runner/child/runner_connection.cc b/mojo/shell/runner/child/runner_connection.cc
index 75b4648dc0db58f70f7753fe65959533d4e84baa..313c00a338d7bdade01b3a465639378835f78a0b 100644
--- a/mojo/shell/runner/child/runner_connection.cc
+++ b/mojo/shell/runner/child/runner_connection.cc
@@ -74,13 +74,6 @@ class Blocker {
using GotApplicationRequestCallback =
base::Callback<void(InterfaceRequest<mojom::ShellClient>)>;
-void OnCreateMessagePipe(ScopedMessagePipeHandle* result,
- Blocker::Unblocker unblocker,
- ScopedMessagePipeHandle pipe) {
- *result = std::move(pipe);
- unblocker.Unblock(base::Bind(&base::DoNothing));
-}
-
void OnGotApplicationRequest(InterfaceRequest<mojom::ShellClient>* out_request,
InterfaceRequest<mojom::ShellClient> request) {
*out_request = std::move(request);
@@ -229,14 +222,11 @@ bool RunnerConnectionImpl::WaitForApplicationRequest(
std::string primordial_pipe_token =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPrimordialPipeToken);
- Blocker blocker;
- edk::CreateChildMessagePipe(
- primordial_pipe_token,
- base::Bind(&OnCreateMessagePipe, base::Unretained(&handle),
- blocker.GetUnblocker()));
- blocker.Block();
+ handle = edk::CreateChildMessagePipe(primordial_pipe_token);
}
+ DCHECK(handle.is_valid());
+
Blocker blocker;
controller_runner_->PostTask(
FROM_HERE,
« no previous file with comments | « mojo/edk/system/remote_message_pipe_bootstrap.cc ('k') | mojo/shell/runner/host/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698