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

Unified Diff: mojo/examples/dbus_echo/dbus_echo_app.cc

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months 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 | « mojo/examples/compositor_app/compositor_host.cc ('k') | mojo/examples/launcher/launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/dbus_echo/dbus_echo_app.cc
diff --git a/mojo/examples/dbus_echo/dbus_echo_app.cc b/mojo/examples/dbus_echo/dbus_echo_app.cc
index 0ccccc6c46d5bfc13e5d14a1608e2d16c6f17d9d..5a9b80f0c154e37bd23631e35c8441f324734a3c 100644
--- a/mojo/examples/dbus_echo/dbus_echo_app.cc
+++ b/mojo/examples/dbus_echo/dbus_echo_app.cc
@@ -8,7 +8,6 @@
#include "base/bind.h"
#include "base/logging.h"
#include "mojo/public/cpp/application/application.h"
-#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/public/cpp/system/macros.h"
@@ -27,14 +26,14 @@ class DBusEchoApp : public Application {
ConnectTo("dbus:org.chromium.EchoService/org/chromium/MojoImpl",
&echo_service_);
- AllocationScope scope;
- echo_service_->Echo("who", base::Bind(&DBusEchoApp::OnEcho,
- base::Unretained(this)));
+ echo_service_->Echo(
+ String::From("who"),
+ base::Bind(&DBusEchoApp::OnEcho, base::Unretained(this)));
}
private:
- void OnEcho(const String& echoed) {
- LOG(INFO) << "echo'd " << echoed.To<std::string>();
+ void OnEcho(String echoed) {
+ LOG(INFO) << "echo'd " << echoed;
}
EchoServicePtr echo_service_;
« no previous file with comments | « mojo/examples/compositor_app/compositor_host.cc ('k') | mojo/examples/launcher/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698