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

Unified Diff: mojo/application/public/cpp/lib/service_registry.cc

Issue 1254383016: ApplicationConnection lifetime management changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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: mojo/application/public/cpp/lib/service_registry.cc
diff --git a/mojo/application/public/cpp/lib/service_registry.cc b/mojo/application/public/cpp/lib/service_registry.cc
index 4f8e6e6565c1b6494daaac7c2fd8f372437caf23..0f9da433df464b3e3e2c62f65829cb856f6f6ecd 100644
--- a/mojo/application/public/cpp/lib/service_registry.cc
+++ b/mojo/application/public/cpp/lib/service_registry.cc
@@ -4,22 +4,20 @@
#include "mojo/application/public/cpp/lib/service_registry.h"
+#include "base/logging.h"
#include "mojo/application/public/cpp/application_connection.h"
-#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/service_connector.h"
namespace mojo {
namespace internal {
ServiceRegistry::ServiceRegistry(
- ApplicationImpl* application_impl,
const std::string& connection_url,
const std::string& remote_url,
ServiceProviderPtr remote_services,
InterfaceRequest<ServiceProvider> local_services,
const std::set<std::string>& allowed_interfaces)
- : application_impl_(application_impl),
- connection_url_(connection_url),
+ : connection_url_(connection_url),
remote_url_(remote_url),
local_binding_(this),
remote_service_provider_(remote_services.Pass()),
@@ -31,8 +29,7 @@ ServiceRegistry::ServiceRegistry(
}
ServiceRegistry::ServiceRegistry()
- : application_impl_(nullptr),
- local_binding_(this),
+ : local_binding_(this),
allow_all_interfaces_(true) {
}
@@ -85,11 +82,6 @@ ServiceProvider* ServiceRegistry::GetServiceProvider() {
ServiceRegistry::~ServiceRegistry() {
sky 2015/08/11 18:28:04 Move to match new position in header.
}
-void ServiceRegistry::OnCloseConnection() {
- if (application_impl_)
- application_impl_->CloseConnection(this);
-}
-
void ServiceRegistry::ConnectToService(const mojo::String& service_name,
ScopedMessagePipeHandle client_handle) {
service_connector_registry_.ConnectToService(this, service_name,

Powered by Google App Engine
This is Rietveld 408576698