Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: services/test_service/test_service_application.cc

Issue 1517743003: Make ApplicationRunner's ctor's ApplicationDelegate* argument an std::unique_ptr instead. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/test_service/test_request_tracker_application.cc ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « services/test_service/test_request_tracker_application.cc ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698