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

Unified Diff: content/common/mojo/mojo_shell_connection_impl.cc

Issue 1915053004: mus/chrome: Always wait for the mojo shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/common/mojo/mojo_shell_connection_impl.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/mojo_shell_connection_impl.cc
diff --git a/content/common/mojo/mojo_shell_connection_impl.cc b/content/common/mojo/mojo_shell_connection_impl.cc
index 8f7f735afeb855140191147fac80662be19166dd..90ad7002f00a484e9c2c48f64676cf031f492b05 100644
--- a/content/common/mojo/mojo_shell_connection_impl.cc
+++ b/content/common/mojo/mojo_shell_connection_impl.cc
@@ -39,13 +39,6 @@ bool IsRunningInMojoShell() {
mojo::edk::PlatformChannelPair::kMojoPlatformChannelHandleSwitch);
}
-bool ShouldWaitForShell() {
- return mojo_shell_connection_factory ||
- (IsRunningInMojoShell() &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kWaitForMojoShell));
-}
-
// static
bool MojoShellConnectionImpl::CreateUsingFactory() {
if (mojo_shell_connection_factory) {
@@ -74,8 +67,6 @@ void MojoShellConnection::Create(shell::mojom::ShellClientRequest request,
lazy_tls_ptr.Pointer()->Set(connection);
connection->shell_connection_.reset(
new shell::ShellConnection(connection, std::move(request)));
- if (is_external)
- connection->WaitForShellIfNecessary();
}
// static
@@ -95,7 +86,6 @@ void MojoShellConnectionImpl::BindToRequestFromCommandLine() {
DCHECK(!shell_connection_);
shell_connection_.reset(new shell::ShellConnection(
this, shell::GetShellClientRequestFromCommandLine()));
- WaitForShellIfNecessary();
}
MojoShellConnectionImpl::MojoShellConnectionImpl(bool external)
@@ -105,15 +95,6 @@ MojoShellConnectionImpl::~MojoShellConnectionImpl() {
STLDeleteElements(&listeners_);
}
-void MojoShellConnectionImpl::WaitForShellIfNecessary() {
- // TODO(rockot): Remove this. http://crbug.com/594852.
- if (ShouldWaitForShell()) {
- base::RunLoop wait_loop;
- shell_connection_->set_initialize_handler(wait_loop.QuitClosure());
- wait_loop.Run();
- }
-}
-
void MojoShellConnectionImpl::Initialize(shell::Connector* connector,
const shell::Identity& identity,
uint32_t id) {}
« no previous file with comments | « content/common/mojo/mojo_shell_connection_impl.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698