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

Unified Diff: services/prediction/prediction_service_impl.cc

Issue 1981513002: ApplicationConnection devolution, part 2.2. (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 | « services/prediction/prediction_service_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/prediction/prediction_service_impl.cc
diff --git a/services/prediction/prediction_service_impl.cc b/services/prediction/prediction_service_impl.cc
index 210b9650833c7b0bafa51a89202e7d08cfe04610..574102ac7b7f2220656d819ecb266a59a8af507e 100644
--- a/services/prediction/prediction_service_impl.cc
+++ b/services/prediction/prediction_service_impl.cc
@@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "services/prediction/prediction_service_impl.h"
+
#include "mojo/application/application_runner_chromium.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
-#include "services/prediction/dictionary_service.h"
-#include "services/prediction/prediction_service_impl.h"
namespace prediction {
@@ -23,7 +21,6 @@ PredictionServiceImpl::PredictionServiceImpl(
PredictionServiceImpl::~PredictionServiceImpl() {
}
-// PredictionService implementation
void PredictionServiceImpl::GetPredictionList(
PredictionInfoPtr prediction_info,
const GetPredictionListCallback& callback) {
@@ -33,26 +30,20 @@ void PredictionServiceImpl::GetPredictionList(
callback.Run(prediction_list.Pass());
}
-PredictionServiceDelegate::PredictionServiceDelegate() {
-}
+PredictionServiceDelegate::PredictionServiceDelegate() {}
-PredictionServiceDelegate::~PredictionServiceDelegate() {
-}
+PredictionServiceDelegate::~PredictionServiceDelegate() {}
-// mojo::ApplicationDelegate implementation
bool PredictionServiceDelegate::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<PredictionService>(this);
+ connection->GetServiceProviderImpl().AddService<PredictionService>(
+ [](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<PredictionService> prediction_service_request) {
+ new PredictionServiceImpl(prediction_service_request.Pass());
+ });
return true;
}
-// mojo::InterfaceRequest<PredictionService> implementation
-void PredictionServiceDelegate::Create(
- const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<PredictionService> request) {
- new PredictionServiceImpl(request.Pass());
-}
-
} // namespace prediction
MojoResult MojoMain(MojoHandle application_request) {
« no previous file with comments | « services/prediction/prediction_service_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698