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

Unified Diff: content/shell/utility/shell_content_utility_client.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/shell/renderer/shell_content_renderer_client.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/utility/shell_content_utility_client.cc
diff --git a/content/shell/utility/shell_content_utility_client.cc b/content/shell/utility/shell_content_utility_client.cc
index 429a1524e8257b3893f18f92349968e6556efbeb..69d156bba03461301c3357bdf5c7914563e53ecb 100644
--- a/content/shell/utility/shell_content_utility_client.cc
+++ b/content/shell/utility/shell_content_utility_client.cc
@@ -37,26 +37,26 @@ class TestServiceImpl : public mojom::TestService {
}
// mojom::TestService implementation:
- void DoSomething(const DoSomethingCallback& callback) override {
- callback.Run();
+ void DoSomething(DoSomethingCallback callback) override {
+ std::move(callback).Run();
}
- void DoTerminateProcess(const DoTerminateProcessCallback& callback) override {
+ void DoTerminateProcess(DoTerminateProcessCallback callback) override {
base::Process::Current().Terminate(0, false);
}
- void CreateFolder(const CreateFolderCallback& callback) override {
+ void CreateFolder(CreateFolderCallback callback) override {
// Note: This is used to check if the sandbox is disabled or not since
// creating a folder is forbidden when it is enabled.
- callback.Run(base::ScopedTempDir().CreateUniqueTempDir());
+ std::move(callback).Run(base::ScopedTempDir().CreateUniqueTempDir());
}
- void GetRequestorName(const GetRequestorNameCallback& callback) override {
+ void GetRequestorName(GetRequestorNameCallback callback) override {
NOTREACHED();
}
void CreateSharedBuffer(const std::string& message,
- const CreateSharedBufferCallback& callback) override {
+ CreateSharedBufferCallback callback) override {
mojo::ScopedSharedBufferHandle buffer =
mojo::SharedBufferHandle::Create(message.size());
CHECK(buffer.is_valid());
@@ -66,7 +66,7 @@ class TestServiceImpl : public mojom::TestService {
std::copy(message.begin(), message.end(),
reinterpret_cast<char*>(mapping.get()));
- callback.Run(std::move(buffer));
+ std::move(callback).Run(std::move(buffer));
}
private:
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698