| Index: examples/apptest/example_service_application.cc
|
| diff --git a/examples/apptest/example_service_application.cc b/examples/apptest/example_service_application.cc
|
| index 993bda38dd437c312a442fbbe40f51eefa7b49d1..8302c257d283104d92c4959928ee323bc3f9e948 100644
|
| --- a/examples/apptest/example_service_application.cc
|
| +++ b/examples/apptest/example_service_application.cc
|
| @@ -16,10 +16,17 @@ ExampleServiceApplication::~ExampleServiceApplication() {}
|
|
|
| bool ExampleServiceApplication::ConfigureIncomingConnection(
|
| ApplicationConnection* connection) {
|
| - connection->AddService(&example_service_factory_);
|
| + connection->AddService<ExampleService>(this);
|
| return true;
|
| }
|
|
|
| +void ExampleServiceApplication::Create(
|
| + ApplicationConnection* connection,
|
| + InterfaceRequest<ExampleService> request) {
|
| + // Not leaked: ExampleServiceImpl deletes itself on detecting a pipe error.
|
| + new ExampleServiceImpl(request.Pass());
|
| +}
|
| +
|
| } // namespace mojo
|
|
|
| MojoResult MojoMain(MojoHandle shell_handle) {
|
|
|