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

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

Issue 1920033005: services/shell: Fix running the connection-lost callback. (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 | « no previous file | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/embedded_application_runner.cc
diff --git a/content/common/mojo/embedded_application_runner.cc b/content/common/mojo/embedded_application_runner.cc
index c220e9a43eb2e6e53afa6e56c6e359bc9e7f0e67..4bba4ac13f096acedfbe2d0ed6d754f998b73174 100644
--- a/content/common/mojo/embedded_application_runner.cc
+++ b/content/common/mojo/embedded_application_runner.cc
@@ -36,12 +36,12 @@ class EmbeddedApplicationRunner::Instance
if (!shell_client_)
shell_client_ = factory_callback_.Run();
- std::unique_ptr<shell::ShellConnection> new_connection(
- new shell::ShellConnection(shell_client_.get(), std::move(request)));
- new_connection->set_connection_lost_closure(
- base::Bind(&Instance::OnShellConnectionLost,
- base::Unretained(this), new_connection.get()));
- shell_connections_.push_back(std::move(new_connection));
+ shell::ShellConnection* new_connection =
+ new shell::ShellConnection(shell_client_.get(), std::move(request));
+ shell_connections_.push_back(base::WrapUnique(new_connection));
+ new_connection->SetConnectionLostClosure(
+ base::Bind(&Instance::OnShellConnectionLost, base::Unretained(this),
+ new_connection));
}
private:
« no previous file with comments | « no previous file | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698