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

Unified Diff: mojo/public/cpp/bindings/tests/bindings_perftest.cc

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
Index: mojo/public/cpp/bindings/tests/bindings_perftest.cc
diff --git a/mojo/public/cpp/bindings/tests/bindings_perftest.cc b/mojo/public/cpp/bindings/tests/bindings_perftest.cc
index 0d4692eb900a20fc17013f88bd137674edfbfe74..689ca2d349d7305f9ee7d0bd4fa9735859e52c59 100644
--- a/mojo/public/cpp/bindings/tests/bindings_perftest.cc
+++ b/mojo/public/cpp/bindings/tests/bindings_perftest.cc
@@ -5,6 +5,7 @@
#include <stddef.h>
#include <utility>
+#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -65,7 +66,7 @@ void PingPongTest::Run(unsigned int iterations) {
base::RunLoop run_loop;
quit_closure_ = run_loop.QuitClosure();
- service_->Ping([this]() { OnPingDone(); });
+ service_->Ping(base::Bind(&PingPongTest::OnPingDone, base::Unretained(this)));
run_loop.Run();
}
@@ -76,7 +77,7 @@ void PingPongTest::OnPingDone() {
return;
}
- service_->Ping([this]() { OnPingDone(); });
+ service_->Ping(base::Bind(&PingPongTest::OnPingDone, base::Unretained(this)));
}
struct BoundPingService {
« no previous file with comments | « mojo/public/cpp/bindings/tests/binding_unittest.cc ('k') | mojo/public/cpp/bindings/tests/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698