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

Unified Diff: content/browser/mojo/mojo_child_connection.cc

Issue 1801963002: Change primordial pipes to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto catalog CL Created 4 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 | « components/resource_provider/resource_provider_app.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_child_connection.cc
diff --git a/content/browser/mojo/mojo_child_connection.cc b/content/browser/mojo/mojo_child_connection.cc
index e8cfc0e344121e7101700f487f9d1952f58a282a..b123240f55093c685b42686c841b436627af690b 100644
--- a/content/browser/mojo/mojo_child_connection.cc
+++ b/content/browser/mojo/mojo_child_connection.cc
@@ -21,6 +21,7 @@
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/shell/public/cpp/connector.h"
#include "mojo/shell/public/interfaces/shell.mojom.h"
+#include "mojo/shell/public/interfaces/shell_client.mojom.h"
namespace content {
namespace {
@@ -91,7 +92,7 @@ std::string MojoConnectToChild(int child_process_id,
// Generate a token and create a pipe which is bound to it. This pipe is
// passed to the shell if one is available.
std::string pipe_token = mojo::edk::GenerateRandomToken();
- mojo::ScopedMessagePipeHandle request_pipe =
+ mojo::ScopedMessagePipeHandle shell_client_pipe =
mojo::edk::CreateParentMessagePipe(pipe_token);
// Some process types get created before the main message loop. In this case
@@ -100,9 +101,9 @@ std::string MojoConnectToChild(int child_process_id,
if (!MojoShellConnection::Get())
return pipe_token;
- mojo::shell::mojom::ShellClientFactoryPtr factory;
- factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>(
- std::move(request_pipe), 0u));
+ mojo::shell::mojom::ShellClientPtr client;
+ client.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClient>(
+ std::move(shell_client_pipe), 0u));
mojo::shell::mojom::PIDReceiverPtr pid_receiver;
mojo::shell::mojom::PIDReceiverRequest pid_receiver_request =
GetProxy(&pid_receiver);
@@ -115,7 +116,7 @@ std::string MojoConnectToChild(int child_process_id,
base::StringPrintf("%d_%d", child_process_id,
instance_id));
mojo::Connector::ConnectParams params(target);
- params.set_client_process_connection(std::move(factory),
+ params.set_client_process_connection(std::move(client),
std::move(pid_receiver_request));
scoped_ptr<mojo::Connection> connection =
MojoShellConnection::Get()->GetConnector()->Connect(&params);
« no previous file with comments | « components/resource_provider/resource_provider_app.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698