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

Unified Diff: services/test_service/test_service_application.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
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 | « services/test_service/test_service_application.h ('k') | services/tracing/tracing_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/test_service/test_service_application.cc
diff --git a/services/test_service/test_service_application.cc b/services/test_service/test_service_application.cc
index 509ddac0d157a564100b398d7082aced603bb4af..bf362d3c274004dc63c42e6eba861fe85dc7c070 100644
--- a/services/test_service/test_service_application.cc
+++ b/services/test_service/test_service_application.cc
@@ -29,22 +29,20 @@ void TestServiceApplication::Initialize(ApplicationImpl* app) {
bool TestServiceApplication::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<TestService>(this);
- connection->AddService<TestTimeService>(this);
+ connection->GetServiceProviderImpl().AddService<TestService>(
+ [this](const ConnectionContext& connection_context,
+ InterfaceRequest<TestService> request) {
+ new TestServiceImpl(app_impl_, this, request.Pass());
+ AddRef();
+ });
+ connection->GetServiceProviderImpl().AddService<TestTimeService>(
+ [this](const ConnectionContext& connection_context,
+ InterfaceRequest<TestTimeService> request) {
+ new TestTimeServiceImpl(app_impl_, request.Pass());
+ });
return true;
}
-void TestServiceApplication::Create(const ConnectionContext& connection_context,
- InterfaceRequest<TestService> request) {
- new TestServiceImpl(app_impl_, this, request.Pass());
- AddRef();
-}
-
-void TestServiceApplication::Create(const ConnectionContext& connection_context,
- InterfaceRequest<TestTimeService> request) {
- new TestTimeServiceImpl(app_impl_, request.Pass());
-}
-
void TestServiceApplication::AddRef() {
assert(ref_count_ >= 0);
ref_count_++;
« no previous file with comments | « services/test_service/test_service_application.h ('k') | services/tracing/tracing_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698