| Index: content/public/common/service_registry.h
|
| diff --git a/content/public/common/service_registry.h b/content/public/common/service_registry.h
|
| index ad8aaf0dadac407f61959539f6341c6e49e6980f..41edc199ce7a78992a03e9e732b8f0e452a811f5 100644
|
| --- a/content/public/common/service_registry.h
|
| +++ b/content/public/common/service_registry.h
|
| @@ -60,6 +60,18 @@ class CONTENT_EXPORT ServiceRegistry {
|
| virtual void ConnectToRemoteService(const base::StringPiece& name,
|
| mojo::ScopedMessagePipeHandle handle) = 0;
|
|
|
| + // Registers a local service factory to intercept ConnectToRemoteService
|
| + // requests instead of actually connecting to the remote registry. Used only
|
| + // for testing.
|
| + virtual void AddServiceOverrideForTesting(
|
| + const std::string& service_name,
|
| + const base::Callback<void(mojo::ScopedMessagePipeHandle)>&
|
| + service_factory) = 0;
|
| +
|
| + // Removes all local service factories registered
|
| + // by AddServiceOverrideForTesting. Used only for testing.
|
| + virtual void ClearServiceOverridesForTesting() = 0;
|
| +
|
| private:
|
| template <typename Interface>
|
| static void ForwardToServiceFactory(
|
|
|