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

Unified Diff: mojo/application/public/cpp/lib/service_registry.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (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
« no previous file with comments | « mojo/application/public/cpp/lib/service_provider_impl.cc ('k') | mojo/common/common_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/lib/service_registry.cc
diff --git a/mojo/application/public/cpp/lib/service_registry.cc b/mojo/application/public/cpp/lib/service_registry.cc
index c376c406fe5e983d00821e59a6d51ccf358e102b..f9e21ce2c9a33e8e32de61ab7f4b35fe66052608 100644
--- a/mojo/application/public/cpp/lib/service_registry.cc
+++ b/mojo/application/public/cpp/lib/service_registry.cc
@@ -4,6 +4,8 @@
#include "mojo/application/public/cpp/lib/service_registry.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/logging.h"
#include "mojo/application/public/cpp/application_connection.h"
@@ -21,7 +23,7 @@ ServiceRegistry::ServiceRegistry(
: connection_url_(connection_url),
remote_url_(remote_url),
local_binding_(this),
- remote_service_provider_(remote_services.Pass()),
+ remote_service_provider_(std::move(remote_services)),
allowed_interfaces_(allowed_interfaces),
allow_all_interfaces_(allowed_interfaces_.size() == 1 &&
allowed_interfaces_.count("*") == 1),
@@ -29,7 +31,7 @@ ServiceRegistry::ServiceRegistry(
is_content_handler_id_valid_(false),
weak_factory_(this) {
if (local_services.is_pending())
- local_binding_.Bind(local_services.Pass());
+ local_binding_.Bind(std::move(local_services));
}
ServiceRegistry::ServiceRegistry()
@@ -127,7 +129,7 @@ void ServiceRegistry::OnGotContentHandlerID(uint32_t content_handler_id) {
void ServiceRegistry::ConnectToService(const mojo::String& service_name,
ScopedMessagePipeHandle client_handle) {
service_connector_registry_.ConnectToService(this, service_name,
- client_handle.Pass());
+ std::move(client_handle));
}
} // namespace internal
« no previous file with comments | « mojo/application/public/cpp/lib/service_provider_impl.cc ('k') | mojo/common/common_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698