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

Unified Diff: examples/echo/echo_client.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/content_handler_demo/content_handler_demo.cc ('k') | examples/echo/echo_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/echo/echo_client.cc
diff --git a/examples/echo/echo_client.cc b/examples/echo/echo_client.cc
index f994dd9acf10608c6fc232ed3411ecbe57b95a90..5ff27cf8206d81e70999ccf5dc7e690c2642c21e 100644
--- a/examples/echo/echo_client.cc
+++ b/examples/echo/echo_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <stdio.h>
+#include <memory>
#include "base/logging.h"
#include "examples/echo/echo.mojom.h"
@@ -39,6 +39,8 @@ class EchoClientDelegate : public ApplicationDelegate {
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunner runner(new mojo::examples::EchoClientDelegate);
+ mojo::ApplicationRunner runner(
+ std::unique_ptr<mojo::examples::EchoClientDelegate>(
+ new mojo::examples::EchoClientDelegate()));
return runner.Run(application_request);
}
« no previous file with comments | « examples/content_handler_demo/content_handler_demo.cc ('k') | examples/echo/echo_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698