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

Unified Diff: content/public/test/test_service.cc

Issue 2871523002: Use OnceCallback on Mojo interfaces in //content (Closed)
Patch Set: . Created 3 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 | « content/public/test/test_service.h ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_service.cc
diff --git a/content/public/test/test_service.cc b/content/public/test/test_service.cc
index b2790bc32a06bae20b4879a5cf5135259b83de26..1d1b1c7bba43873c82c570dcdce4ef334b9bcd78 100644
--- a/content/public/test/test_service.cc
+++ b/content/public/test/test_service.cc
@@ -37,27 +37,25 @@ void TestService::Create(const service_manager::BindSourceInfo& source_info,
service_binding_.Bind(std::move(request));
}
-void TestService::DoSomething(const DoSomethingCallback& callback) {
- callback.Run();
+void TestService::DoSomething(DoSomethingCallback callback) {
+ std::move(callback).Run();
base::MessageLoop::current()->QuitWhenIdle();
}
-void TestService::DoTerminateProcess(
- const DoTerminateProcessCallback& callback) {
+void TestService::DoTerminateProcess(DoTerminateProcessCallback callback) {
NOTREACHED();
}
-void TestService::CreateFolder(const CreateFolderCallback& callback) {
+void TestService::CreateFolder(CreateFolderCallback callback) {
NOTREACHED();
}
-void TestService::GetRequestorName(const GetRequestorNameCallback& callback) {
- callback.Run(requestor_name_);
+void TestService::GetRequestorName(GetRequestorNameCallback callback) {
+ std::move(callback).Run(requestor_name_);
}
-void TestService::CreateSharedBuffer(
- const std::string& message,
- const CreateSharedBufferCallback& callback) {
+void TestService::CreateSharedBuffer(const std::string& message,
+ CreateSharedBufferCallback callback) {
NOTREACHED();
}
« no previous file with comments | « content/public/test/test_service.h ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698