Index: services/test_service/test_service_application.cc |
diff --git a/services/test_service/test_service_application.cc b/services/test_service/test_service_application.cc |
index f168cb68365232efca41c79f2fc63a5286b259c5..b288d9883b076d2e6db096eafa6948da2d21c34b 100644 |
--- a/services/test_service/test_service_application.cc |
+++ b/services/test_service/test_service_application.cc |
@@ -6,6 +6,8 @@ |
#include <assert.h> |
+#include <memory> |
+ |
#include "mojo/public/c/system/main.h" |
#include "mojo/public/cpp/application/application_connection.h" |
#include "mojo/public/cpp/application/application_runner.h" |
@@ -17,11 +19,9 @@ namespace mojo { |
namespace test { |
TestServiceApplication::TestServiceApplication() |
- : ref_count_(0), app_impl_(nullptr) { |
-} |
+ : ref_count_(0), app_impl_(nullptr) {} |
-TestServiceApplication::~TestServiceApplication() { |
-} |
+TestServiceApplication::~TestServiceApplication() {} |
void TestServiceApplication::Initialize(ApplicationImpl* app) { |
app_impl_ = app; |
@@ -61,6 +61,8 @@ void TestServiceApplication::ReleaseRef() { |
} // namespace mojo |
MojoResult MojoMain(MojoHandle application_request) { |
- mojo::ApplicationRunner runner(new mojo::test::TestServiceApplication); |
+ mojo::ApplicationRunner runner( |
+ std::unique_ptr<mojo::test::TestServiceApplication>( |
+ new mojo::test::TestServiceApplication())); |
return runner.Run(application_request); |
} |