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

Unified Diff: mojo/shell/public/cpp/lib/shell_connection.cc

Issue 1819063002: Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and update resourceproviderunittest 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 | « mojo/shell/public/cpp/lib/shell_client.cc ('k') | mojo/shell/public/cpp/shell_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/shell_connection.cc
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc
index d1cba7ea31e040427ad194fdf369945085bf2962..62ae598222c360c3c9e78c70d816007505326dc8 100644
--- a/mojo/shell/public/cpp/lib/shell_connection.cc
+++ b/mojo/shell/public/cpp/lib/shell_connection.cc
@@ -86,7 +86,8 @@ void ShellConnection::OnConnectionError() {
// Note that the ShellClient doesn't technically have to quit now, it may live
// on to service existing connections. All existing Connectors however are
// invalid.
- client_->ShellConnectionLost();
+ if (client_->ShellConnectionLost() && !connection_lost_closure_.is_null())
+ connection_lost_closure_.Run();
// We don't reset the connector as clients may have taken a raw pointer to it.
// Connect() will return nullptr if they try to connect to anything.
}
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_client.cc ('k') | mojo/shell/public/cpp/shell_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698