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

Unified Diff: examples/echo/echo_server.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/echo/echo_client.cc ('k') | examples/indirect_service/indirect_integer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/echo/echo_server.cc
diff --git a/examples/echo/echo_server.cc b/examples/echo/echo_server.cc
index 6ff79a68826c38f04029bd8db85b2ddab5eb4a79..43a975e0eeecf66d3c6d867baa1c5e52ca00317e 100644
--- a/examples/echo/echo_server.cc
+++ b/examples/echo/echo_server.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/echo/echo.mojom.h"
#include "mojo/common/binding_set.h"
#include "mojo/public/c/system/main.h"
@@ -133,7 +135,8 @@ class OneAtATimeServer : public mojo::ApplicationDelegate,
MojoResult MojoMain(MojoHandle application_request) {
// Uncomment one of the three servers at a time to see it work:
- mojo::ApplicationRunner runner(new mojo::examples::MultiServer());
+ mojo::ApplicationRunner runner(std::unique_ptr<mojo::examples::MultiServer>(
+ new mojo::examples::MultiServer()));
// mojo::ApplicationRunner runner(new mojo::examples::SingletonServer());
// mojo::ApplicationRunner runner(new mojo::examples::OneAtATimeServer());
« no previous file with comments | « examples/echo/echo_client.cc ('k') | examples/indirect_service/indirect_integer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698