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

Unified Diff: mojo/services/test_service/test_service_application.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 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/services/test_service/test_service_application.cc
diff --git a/mojo/services/test_service/test_service_application.cc b/mojo/services/test_service/test_service_application.cc
index 097f368bc6593e45abeae8c594b9e0a23f669738..074e2e8dedba300e308eef502b43142c7101ee5e 100644
--- a/mojo/services/test_service/test_service_application.cc
+++ b/mojo/services/test_service/test_service_application.cc
@@ -22,11 +22,21 @@ TestServiceApplication::~TestServiceApplication() {
bool TestServiceApplication::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<TestServiceImpl>(this);
- connection->AddService<TestTimeServiceImpl>();
+ connection->AddService<TestService>(this);
+ connection->AddService<TestTimeService>(this);
return true;
}
+void TestServiceApplication::Create(ApplicationConnection* connection,
+ InterfaceRequest<TestService> request) {
+ BindToRequest(new TestServiceImpl(connection, this), &request);
+}
+
+void TestServiceApplication::Create(ApplicationConnection* connection,
+ InterfaceRequest<TestTimeService> request) {
+ BindToRequest(new TestTimeServiceImpl(connection), &request);
+}
+
void TestServiceApplication::AddRef() {
assert(ref_count_ >= 0);
ref_count_++;
« no previous file with comments | « mojo/services/test_service/test_service_application.h ('k') | mojo/services/test_service/test_time_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698