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

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

Issue 1128493002: Add connection error handing in ServiceRegistryImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 7 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/service_registry_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/service_registry_impl.cc
diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc
index eec7640bc300e15425f9d99c95fccdc3cab5c2a4..ac4eb7dd6bac7e6bff9ee7fb83b7412710012406 100644
--- a/content/common/mojo/service_registry_impl.cc
+++ b/content/common/mojo/service_registry_impl.cc
@@ -10,6 +10,7 @@ namespace content {
ServiceRegistryImpl::ServiceRegistryImpl()
: binding_(this), weak_factory_(this) {
+ binding_.set_error_handler(this);
}
ServiceRegistryImpl::~ServiceRegistryImpl() {
@@ -58,6 +59,10 @@ void ServiceRegistryImpl::ConnectToRemoteService(
handle.Pass());
}
+bool ServiceRegistryImpl::IsBound() const {
+ return binding_.is_bound();
+}
+
base::WeakPtr<ServiceRegistry> ServiceRegistryImpl::GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
@@ -74,4 +79,8 @@ void ServiceRegistryImpl::ConnectToService(
it->second.Run(client_handle.Pass());
}
+void ServiceRegistryImpl::OnConnectionError() {
+ binding_.Close();
+}
+
} // namespace content
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698