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

Unified Diff: trunk/src/mojo/service_manager/background_shell_service_loader.cc

Issue 443063003: Revert 287680 "mojo: terminate apps if the shell goes away" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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
Index: trunk/src/mojo/service_manager/background_shell_service_loader.cc
===================================================================
--- trunk/src/mojo/service_manager/background_shell_service_loader.cc (revision 287751)
+++ trunk/src/mojo/service_manager/background_shell_service_loader.cc (working copy)
@@ -35,7 +35,8 @@
scoped_ptr<ServiceLoader> real_loader,
const std::string& thread_name,
base::MessageLoop::Type message_loop_type)
- : loader_(real_loader.Pass()),
+ : quit_on_shutdown_(false),
+ loader_(real_loader.Pass()),
message_loop_type_(message_loop_type),
thread_name_(thread_name),
message_loop_created_(true, false),
@@ -43,8 +44,11 @@
}
BackgroundShellServiceLoader::~BackgroundShellServiceLoader() {
- if (thread_)
+ if (thread_) {
+ if (quit_on_shutdown_)
+ task_runner_->PostTask(FROM_HERE, quit_closure_);
thread_->Join();
+ }
}
void BackgroundShellServiceLoader::LoadService(

Powered by Google App Engine
This is Rietveld 408576698