| Index: mojo/public/cpp/application/lib/service_connector.h
|
| diff --git a/mojo/public/cpp/application/lib/service_connector.h b/mojo/public/cpp/application/lib/service_connector.h
|
| index 3a7e596f084311b6b2193b44975c4e20735722c0..914b2a924e85614cb08c9eacf93f269c889a1b14 100644
|
| --- a/mojo/public/cpp/application/lib/service_connector.h
|
| +++ b/mojo/public/cpp/application/lib/service_connector.h
|
| @@ -77,19 +77,23 @@ class ServiceConnectorBase {
|
| }
|
| ServiceProviderPtr service_provider_;
|
| };
|
| - ServiceConnectorBase() : owner_(NULL) {}
|
| + ServiceConnectorBase(const std::string& name) : name_(name), owner_(NULL) {}
|
| virtual ~ServiceConnectorBase();
|
| virtual void ConnectToService(const std::string& url,
|
| + const std::string& name,
|
| ScopedMessagePipeHandle client_handle) = 0;
|
| + std::string name() const { return name_; }
|
|
|
| protected:
|
| + std::string name_;
|
| Owner* owner_;
|
| };
|
|
|
| template <class ServiceImpl, typename Context=void>
|
| class ServiceConnector : public internal::ServiceConnectorBase {
|
| public:
|
| - ServiceConnector(Context* context = NULL) : context_(context) {}
|
| + ServiceConnector(const std::string& name, Context* context = NULL)
|
| + : ServiceConnectorBase(name), context_(context) {}
|
|
|
| virtual ~ServiceConnector() {
|
| ConnectionList doomed;
|
| @@ -102,6 +106,7 @@ class ServiceConnector : public internal::ServiceConnectorBase {
|
| }
|
|
|
| virtual void ConnectToService(const std::string& url,
|
| + const std::string& name,
|
| ScopedMessagePipeHandle handle) MOJO_OVERRIDE {
|
| ServiceConnection<ServiceImpl, Context>* impl =
|
| ServiceConstructor<ServiceImpl, Context>::New(context_);
|
|
|