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

Unified Diff: trunk/src/mojo/public/cpp/application/lib/application_impl.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/public/cpp/application/lib/application_impl.cc
===================================================================
--- trunk/src/mojo/public/cpp/application/lib/application_impl.cc (revision 287751)
+++ trunk/src/mojo/public/cpp/application/lib/application_impl.cc (working copy)
@@ -10,45 +10,30 @@
namespace mojo {
-ApplicationImpl::ShellPtrWatcher::ShellPtrWatcher(ApplicationImpl* impl)
- : impl_(impl) {}
-
-ApplicationImpl::ShellPtrWatcher::~ShellPtrWatcher() {}
-
-void ApplicationImpl::ShellPtrWatcher::OnConnectionError() {
- impl_->OnShellError();
-}
-
ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate)
- : delegate_(delegate), shell_watch_(this) {}
+ : delegate_(delegate) {}
ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate,
ScopedMessagePipeHandle shell_handle)
- : delegate_(delegate), shell_watch_(this) {
+ : delegate_(delegate) {
BindShell(shell_handle.Pass());
}
ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate,
MojoHandle shell_handle)
- : delegate_(delegate), shell_watch_(this) {
+ : delegate_(delegate) {
BindShell(shell_handle);
}
-void ApplicationImpl::ClearConnections() {
+ApplicationImpl::~ApplicationImpl() {
for (ServiceRegistryList::iterator i(incoming_service_registries_.begin());
i != incoming_service_registries_.end(); ++i)
delete *i;
for (ServiceRegistryList::iterator i(outgoing_service_registries_.begin());
i != outgoing_service_registries_.end(); ++i)
delete *i;
- incoming_service_registries_.clear();
- outgoing_service_registries_.clear();
}
-ApplicationImpl::~ApplicationImpl() {
- ClearConnections();
-}
-
ApplicationConnection* ApplicationImpl::ConnectToApplication(
const String& application_url) {
ServiceProviderPtr out_service_provider;
@@ -68,7 +53,6 @@
void ApplicationImpl::BindShell(ScopedMessagePipeHandle shell_handle) {
shell_.Bind(shell_handle.Pass());
shell_.set_client(this);
- shell_.set_error_handler(&shell_watch_);
delegate_->Initialize(this);
}

Powered by Google App Engine
This is Rietveld 408576698