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

Unified Diff: content/browser/dom_storage/local_storage_context_mojo_unittest.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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 | « components/nacl/common/nacl_service.cc ('k') | content/public/test/test_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/local_storage_context_mojo_unittest.cc
diff --git a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
index 0f4fa583502eccf7c5d20622f75cda993a80f2eb..05733f82c0af5eec19534a7f1b132b1e3fff8370 100644
--- a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
+++ b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
@@ -617,14 +617,17 @@ class ServiceTestClient : public service_manager::test::ServiceTestClient,
service_manager::mojom::ServiceFactory> {
public:
explicit ServiceTestClient(service_manager::test::ServiceTest* test)
- : service_manager::test::ServiceTestClient(test) {}
+ : service_manager::test::ServiceTestClient(test) {
+ registry_.AddInterface<service_manager::mojom::ServiceFactory>(this);
+ }
~ServiceTestClient() override {}
protected:
- bool OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) override {
- registry->AddInterface<service_manager::mojom::ServiceFactory>(this);
- return true;
+ void OnBindInterface(const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) override {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void CreateService(service_manager::mojom::ServiceRequest request,
@@ -644,6 +647,7 @@ class ServiceTestClient : public service_manager::test::ServiceTestClient,
}
private:
+ service_manager::BinderRegistry registry_;
mojo::BindingSet<service_manager::mojom::ServiceFactory>
service_factory_bindings_;
std::unique_ptr<service_manager::ServiceContext> file_service_context_;
« no previous file with comments | « components/nacl/common/nacl_service.cc ('k') | content/public/test/test_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698