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

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

Issue 2099423002: Convert UtilityProcess to use MojoChild/ShellConnection for the shell handshake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu
Patch Set: . 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 | « content/browser/mojo/constants.cc ('k') | content/browser/mojo/mojo_shell_context.cc » ('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 c837cbcb2df5f73b9efd7eb3a7f97a1950d1acb5..896d8f5aafc4b976d5194801dc3ac0658f2cc90d 100644
--- a/content/browser/mojo/mojo_child_connection.cc
+++ b/content/browser/mojo/mojo_child_connection.cc
@@ -35,6 +35,11 @@ MojoChildConnection::MojoChildConnection(const std::string& application_name,
shell::Connector::ConnectParams params(target);
params.set_client_process_connection(std::move(client),
std::move(pid_receiver_request));
+
+ // In some unit testing scenarios a null connector is passed.
+ if (!connector)
+ return;
+
connection_ = connector->Connect(&params);
#if defined(OS_ANDROID)
service_registry_android_ = ServiceRegistryAndroid::Create(
« no previous file with comments | « content/browser/mojo/constants.cc ('k') | content/browser/mojo/mojo_shell_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698