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

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

Issue 1971613002: Abstract out connection information into ConnectionContext. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 | « mojo/public/cpp/application/lib/service_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/application/lib/service_registry.cc
diff --git a/mojo/public/cpp/application/lib/service_registry.cc b/mojo/public/cpp/application/lib/service_registry.cc
index 734dc1b3bb59dca1b351bcfaa5be88a1a1c55d97..6be0e100bc6804d57cef043ede377d6d3c58645f 100644
--- a/mojo/public/cpp/application/lib/service_registry.cc
+++ b/mojo/public/cpp/application/lib/service_registry.cc
@@ -13,12 +13,9 @@ namespace internal {
ServiceRegistry::ServiceRegistry() : local_binding_(this) {}
ServiceRegistry::ServiceRegistry(
- const std::string& connection_url,
- const std::string& remote_url,
+ const ConnectionContext& connection_context,
InterfaceRequest<ServiceProvider> local_services)
- : connection_url_(connection_url),
- remote_url_(remote_url),
- local_binding_(this) {
+ : connection_context_(connection_context), local_binding_(this) {
if (local_services.is_pending())
local_binding_.Bind(local_services.Pass());
}
@@ -38,11 +35,11 @@ void ServiceRegistry::RemoveServiceConnectorForName(
}
const std::string& ServiceRegistry::GetConnectionURL() {
- return connection_url_;
+ return connection_context_.connection_url;
}
const std::string& ServiceRegistry::GetRemoteApplicationURL() {
- return remote_url_;
+ return connection_context_.remote_url;
}
void ServiceRegistry::ConnectToService(const String& service_name,
« no previous file with comments | « mojo/public/cpp/application/lib/service_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698