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

Unified Diff: services/icu_data/icu_data_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/http_server/http_server_app.cc ('k') | services/keyboard/linux/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/icu_data/icu_data_impl.cc
diff --git a/services/icu_data/icu_data_impl.cc b/services/icu_data/icu_data_impl.cc
index 71929286c1ceb4c40a70ab0eeb1d68b6c60ad3c2..2a34755e4f2c1e91a426dd6f2d62351eb23958bf 100644
--- a/services/icu_data/icu_data_impl.cc
+++ b/services/icu_data/icu_data_impl.cc
@@ -7,16 +7,13 @@
#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/application/interface_factory.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
#include "mojo/services/icu_data/interfaces/icu_data.mojom.h"
#include "services/icu_data/kICUData.h"
namespace icu_data {
-class ICUDataImpl : public mojo::ApplicationDelegate,
- public ICUData,
- public mojo::InterfaceFactory<ICUData> {
+class ICUDataImpl : public mojo::ApplicationDelegate, public ICUData {
public:
ICUDataImpl() {}
~ICUDataImpl() override {}
@@ -24,14 +21,13 @@ class ICUDataImpl : public mojo::ApplicationDelegate,
// mojo::ApplicationDelegate implementation.
bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
- connection->AddService(this);
- return true;
- }
+ connection->GetServiceProviderImpl().AddService<ICUData>(
+ [this](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<ICUData> icu_data_request) {
+ bindings_.AddBinding(this, icu_data_request.Pass());
+ });
- // mojo::InterfaceFactory<mojo::ICUData> implementation.
- void Create(const mojo::ConnectionContext& connection,
- mojo::InterfaceRequest<ICUData> request) override {
- bindings_.AddBinding(this, request.Pass());
+ return true;
}
void Map(const mojo::String& sha1hash,
« no previous file with comments | « services/http_server/http_server_app.cc ('k') | services/keyboard/linux/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698