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..8ac343158d1da81cc69812c2674c84066afe264d 100644 |
--- a/content/public/common/service_registry.h |
+++ b/content/public/common/service_registry.h |
@@ -60,6 +60,16 @@ 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; |
+ |
+ virtual void ClearServiceOverridesForTesting() = 0; |
jam
2016/03/18 17:01:13
nit: document
leonhsl(Using Gerrit)
2016/03/19 05:05:12
Done.
|
+ |
private: |
template <typename Interface> |
static void ForwardToServiceFactory( |