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

Unified Diff: services/test_service/test_request_tracker_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
Index: services/test_service/test_request_tracker_application.cc
diff --git a/services/test_service/test_request_tracker_application.cc b/services/test_service/test_request_tracker_application.cc
index ed23d441fabe77a83776892b6a234c4531e3d177..b1f07151e184ff09d70fc3fc564a92d277fa9f63 100644
--- a/services/test_service/test_request_tracker_application.cc
+++ b/services/test_service/test_request_tracker_application.cc
@@ -29,30 +29,24 @@ bool TestRequestTrackerApplication::ConfigureIncomingConnection(
ApplicationConnection* connection) {
// Every instance of the service and recorder shares the context.
// Note, this app is single-threaded, so this is thread safe.
- connection->AddService<TestTimeService>(this);
- connection->AddService<TestRequestTracker>(this);
- connection->AddService<TestTrackedRequestService>(this);
+ connection->GetServiceProviderImpl().AddService<TestTimeService>(
+ [this](const ConnectionContext& connection_context,
+ InterfaceRequest<TestTimeService> request) {
+ new TestTimeServiceImpl(app_impl_, request.Pass());
+ });
+ connection->GetServiceProviderImpl().AddService<TestRequestTracker>(
+ [this](const ConnectionContext& connection_context,
+ InterfaceRequest<TestRequestTracker> request) {
+ new TestRequestTrackerImpl(request.Pass(), &context_);
+ });
+ connection->GetServiceProviderImpl().AddService<TestTrackedRequestService>(
+ [this](const ConnectionContext& connection_context,
+ InterfaceRequest<TestTrackedRequestService> request) {
+ new TestTrackedRequestServiceImpl(request.Pass(), &context_);
+ });
return true;
}
-void TestRequestTrackerApplication::Create(
- const ConnectionContext& connection_context,
- InterfaceRequest<TestTimeService> request) {
- new TestTimeServiceImpl(app_impl_, request.Pass());
-}
-
-void TestRequestTrackerApplication::Create(
- const ConnectionContext& connection_context,
- InterfaceRequest<TestRequestTracker> request) {
- new TestRequestTrackerImpl(request.Pass(), &context_);
-}
-
-void TestRequestTrackerApplication::Create(
- const ConnectionContext& connection_context,
- InterfaceRequest<TestTrackedRequestService> request) {
- new TestTrackedRequestServiceImpl(request.Pass(), &context_);
-}
-
} // namespace test
} // namespace mojo
« no previous file with comments | « services/test_service/test_request_tracker_application.h ('k') | services/test_service/test_service_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698