| Index: content/common/mojo/service_registry_impl.cc
|
| diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc
|
| index d75f64d5d4163599215cbff86387dff5ce2f4c47..a55864f92ea7066fe908327776bfdb5dd3dadc6a 100644
|
| --- a/content/common/mojo/service_registry_impl.cc
|
| +++ b/content/common/mojo/service_registry_impl.cc
|
| @@ -39,14 +39,9 @@
|
| }
|
| }
|
|
|
| -void ServiceRegistryImpl::AddServiceOverrideForTesting(
|
| +void ServiceRegistryImpl::AddService(
|
| const std::string& service_name,
|
| - const ServiceFactory& factory) {
|
| - service_overrides_[service_name] = factory;
|
| -}
|
| -
|
| -void ServiceRegistryImpl::AddService(const std::string& service_name,
|
| - const ServiceFactory service_factory) {
|
| + const base::Callback<void(mojo::ScopedMessagePipeHandle)> service_factory) {
|
| service_factories_[service_name] = service_factory;
|
| }
|
|
|
| @@ -57,12 +52,6 @@
|
| void ServiceRegistryImpl::ConnectToRemoteService(
|
| const base::StringPiece& service_name,
|
| mojo::ScopedMessagePipeHandle handle) {
|
| - auto override_it = service_overrides_.find(service_name.as_string());
|
| - if (override_it != service_overrides_.end()) {
|
| - override_it->second.Run(std::move(handle));
|
| - return;
|
| - }
|
| -
|
| if (!remote_provider_) {
|
| pending_connects_.push(
|
| std::make_pair(service_name.as_string(), handle.release()));
|
| @@ -83,7 +72,9 @@
|
| void ServiceRegistryImpl::ConnectToService(
|
| const mojo::String& name,
|
| mojo::ScopedMessagePipeHandle client_handle) {
|
| - auto it = service_factories_.find(name);
|
| + std::map<std::string,
|
| + base::Callback<void(mojo::ScopedMessagePipeHandle)> >::iterator it =
|
| + service_factories_.find(name);
|
| if (it == service_factories_.end())
|
| return;
|
|
|
|
|