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

Unified Diff: content/common/mojo/service_registry_impl.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
Index: content/common/mojo/service_registry_impl.cc
diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc
index 2303f3b97236bc8c416a48e3b9f1a1b4d163f2e9..a55864f92ea7066fe908327776bfdb5dd3dadc6a 100644
--- a/content/common/mojo/service_registry_impl.cc
+++ b/content/common/mojo/service_registry_impl.cc
@@ -4,6 +4,8 @@
#include "content/common/mojo/service_registry_impl.h"
+#include <utility>
+
#include "mojo/common/common_type_converters.h"
namespace content {
@@ -20,7 +22,7 @@ ServiceRegistryImpl::~ServiceRegistryImpl() {
void ServiceRegistryImpl::Bind(
mojo::InterfaceRequest<mojo::ServiceProvider> request) {
- binding_.Bind(request.Pass());
+ binding_.Bind(std::move(request));
binding_.set_connection_error_handler(base::Bind(
&ServiceRegistryImpl::OnConnectionError, base::Unretained(this)));
}
@@ -28,7 +30,7 @@ void ServiceRegistryImpl::Bind(
void ServiceRegistryImpl::BindRemoteServiceProvider(
mojo::ServiceProviderPtr service_provider) {
CHECK(!remote_provider_);
- remote_provider_ = service_provider.Pass();
+ remote_provider_ = std::move(service_provider);
while (!pending_connects_.empty()) {
remote_provider_->ConnectToService(
mojo::String::From(pending_connects_.front().first),
@@ -56,7 +58,7 @@ void ServiceRegistryImpl::ConnectToRemoteService(
return;
}
remote_provider_->ConnectToService(
- mojo::String::From(service_name.as_string()), handle.Pass());
+ mojo::String::From(service_name.as_string()), std::move(handle));
}
bool ServiceRegistryImpl::IsBound() const {
@@ -83,7 +85,7 @@ void ServiceRegistryImpl::ConnectToService(
return;
}
- it->second.Run(client_handle.Pass());
+ it->second.Run(std::move(client_handle));
}
void ServiceRegistryImpl::OnConnectionError() {
« no previous file with comments | « content/common/mojo/mojo_shell_connection_impl.cc ('k') | content/common/sandbox_linux/sandbox_init_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698