| Index: mojo/services/network/main.cc
|
| diff --git a/mojo/services/network/main.cc b/mojo/services/network/main.cc
|
| index 3cfc74f43f06c5008da70af9870b89ebd2c8ee9d..d360ab2639f1276ad9541d3738ef64ac70e4483e 100644
|
| --- a/mojo/services/network/main.cc
|
| +++ b/mojo/services/network/main.cc
|
| @@ -31,7 +31,8 @@ void OnPathReceived(base::FilePath* path, const mojo::String& path_as_string) {
|
|
|
| } // namespace
|
|
|
| -class Delegate : public mojo::ApplicationDelegate {
|
| +class Delegate : public mojo::ApplicationDelegate,
|
| + public mojo::InterfaceProvider<mojo::NetworkService> {
|
| public:
|
| Delegate() {}
|
|
|
| @@ -48,13 +49,21 @@ class Delegate : public mojo::ApplicationDelegate {
|
| context_.reset(new mojo::NetworkContext(base_path));
|
| }
|
|
|
| + // mojo::ApplicationDelegate implementation.
|
| virtual bool ConfigureIncomingConnection(
|
| mojo::ApplicationConnection* connection) MOJO_OVERRIDE {
|
| DCHECK(context_);
|
| - connection->AddService<mojo::NetworkServiceImpl>(context_.get());
|
| + connection->AddServiceProvider(this);
|
| return true;
|
| }
|
|
|
| + // mojo::InterfaceProvider<mojo::NetworkService> implementation.
|
| + virtual void BindToRequest(
|
| + mojo::ApplicationConnection* connection,
|
| + mojo::InterfaceRequest<mojo::NetworkService> request) MOJO_OVERRIDE {
|
| + mojo::BindToRequest(new mojo::NetworkServiceImpl(context_.get()), &request);
|
| + }
|
| +
|
| private:
|
| scoped_ptr<mojo::NetworkContext> context_;
|
| };
|
|
|