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

Unified Diff: examples/spinning_cube/spinning_cube_app.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/integer_service.cc ('k') | examples/wget/wget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/spinning_cube/spinning_cube_app.cc
diff --git a/examples/spinning_cube/spinning_cube_app.cc b/examples/spinning_cube/spinning_cube_app.cc
index 613510d056ff61d4dc47a63ae5bb863fe8c5fa59..a018e3af8e20d1d5b10097fa915bc86ebebd3f6b 100644
--- a/examples/spinning_cube/spinning_cube_app.cc
+++ b/examples/spinning_cube/spinning_cube_app.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <stdio.h>
-#include <string>
+#include <assert.h>
+
+#include <memory>
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
@@ -91,6 +92,7 @@ class SpinningCubeApp : public mojo::ApplicationDelegate,
} // namespace examples
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunner runner(new examples::SpinningCubeApp);
+ mojo::ApplicationRunner runner(std::unique_ptr<examples::SpinningCubeApp>(
+ new examples::SpinningCubeApp()));
return runner.Run(application_request);
}
« no previous file with comments | « examples/indirect_service/integer_service.cc ('k') | examples/wget/wget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698