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

Unified Diff: content/common/service_manager/service_manager_connection_impl.cc

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . Created 4 years, 2 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/leveldb/leveldb_app.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/common/service_manager/service_manager_connection_impl.cc
diff --git a/content/common/service_manager/service_manager_connection_impl.cc b/content/common/service_manager/service_manager_connection_impl.cc
index 06e23eeb294da7f41892e4f85e6617ad34b9e4ff..0ba66da6f680fe94ec9ea2fe8625635a6cce106c 100644
--- a/content/common/service_manager/service_manager_connection_impl.cc
+++ b/content/common/service_manager/service_manager_connection_impl.cc
@@ -218,19 +218,19 @@ class ServiceManagerConnectionImpl::IOThreadContext
/////////////////////////////////////////////////////////////////////////////
// service_manager::Service implementation
- void OnStart(const service_manager::Identity& identity) override {
+ void OnStart(const service_manager::ServiceInfo& info) override {
DCHECK(io_thread_checker_.CalledOnValidThread());
DCHECK(!initialize_handler_.is_null());
- id_ = identity;
+ id_ = info.identity;
InitializeCallback handler = base::ResetAndReturn(&initialize_handler_);
- callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity));
+ callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, id_));
}
- bool OnConnect(const service_manager::Identity& remote_identity,
+ bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override {
DCHECK(io_thread_checker_.CalledOnValidThread());
- std::string remote_service = remote_identity.name();
+ std::string remote_service = remote_info.identity.name();
if (remote_service == "service:service_manager") {
// Only expose the ServiceFactory interface to the Service Manager.
registry->AddInterface<service_manager::mojom::ServiceFactory>(this);
@@ -241,12 +241,12 @@ class ServiceManagerConnectionImpl::IOThreadContext
{
base::AutoLock lock(lock_);
for (auto& entry : connection_filters_) {
- accept |= entry.second->OnConnect(remote_identity, registry,
+ accept |= entry.second->OnConnect(remote_info.identity, registry,
service_context_->connector());
}
}
- if (remote_identity.name() == "service:content_browser" &&
+ if (remote_service == "service:content_browser" &&
!has_browser_connection_) {
has_browser_connection_ = true;
registry->set_default_binder(default_browser_binder_);
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | content/public/test/test_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698