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

Unified Diff: examples/indirect_service/integer_service.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 | « examples/indirect_service/indirect_integer_service.cc ('k') | examples/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/indirect_service/integer_service.cc
diff --git a/examples/indirect_service/integer_service.cc b/examples/indirect_service/integer_service.cc
index 8399eb0ae253c1ccceb1d0388516f75a9a12dae7..42f718f1a4da8ab4b2bec1647b214d4de1cb82d2 100644
--- a/examples/indirect_service/integer_service.cc
+++ b/examples/indirect_service/integer_service.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
+
#include "examples/indirect_service/indirect_service_demo.mojom.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
@@ -48,7 +50,9 @@ class IntegerServiceAppDelegate : public ApplicationDelegate,
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunner runner(new mojo::examples::IntegerServiceAppDelegate);
+ mojo::ApplicationRunner runner(
+ std::unique_ptr<mojo::examples::IntegerServiceAppDelegate>(
+ new mojo::examples::IntegerServiceAppDelegate));
return runner.Run(application_request);
}
« no previous file with comments | « examples/indirect_service/indirect_integer_service.cc ('k') | examples/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698