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

Unified Diff: device/serial/serial_connection_factory.cc

Issue 1544323002: Convert Pass()→std::move() in //device (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 | « device/serial/serial_connection.cc ('k') | device/serial/serial_connection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_connection_factory.cc
diff --git a/device/serial/serial_connection_factory.cc b/device/serial/serial_connection_factory.cc
index 49b9bc81991887fcb056f40f6d82f1c926e4df95..d167a7878336b21b7dc5a69d775aaed827127916 100644
--- a/device/serial/serial_connection_factory.cc
+++ b/device/serial/serial_connection_factory.cc
@@ -4,6 +4,8 @@
#include "device/serial/serial_connection_factory.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
@@ -74,9 +76,9 @@ void SerialConnectionFactory::CreateConnection(
mojo::InterfaceRequest<serial::DataSink> sink,
mojo::InterfaceRequest<serial::DataSource> source,
mojo::InterfacePtr<serial::DataSourceClient> source_client) {
- scoped_refptr<ConnectTask> task(
- new ConnectTask(this, path, options.Pass(), connection_request.Pass(),
- sink.Pass(), source.Pass(), source_client.Pass()));
+ scoped_refptr<ConnectTask> task(new ConnectTask(
+ this, path, std::move(options), std::move(connection_request),
+ std::move(sink), std::move(source), std::move(source_client)));
task->Run();
}
@@ -93,10 +95,10 @@ SerialConnectionFactory::ConnectTask::ConnectTask(
mojo::InterfacePtr<serial::DataSourceClient> source_client)
: factory_(factory),
path_(path),
- options_(options.Pass()),
- connection_request_(connection_request.Pass()),
- sink_(sink.Pass()),
- source_(source.Pass()),
+ options_(std::move(options)),
+ connection_request_(std::move(connection_request)),
+ sink_(std::move(sink)),
+ source_(std::move(source)),
source_client_(source_client.PassInterface()) {
if (!options_) {
options_ = serial::ConnectionOptions::New();
@@ -126,9 +128,9 @@ void SerialConnectionFactory::ConnectTask::OnConnected(bool success) {
return;
}
- new SerialConnection(io_handler_, sink_.Pass(), source_.Pass(),
- mojo::MakeProxy(source_client_.Pass()),
- connection_request_.Pass());
+ new SerialConnection(io_handler_, std::move(sink_), std::move(source_),
+ mojo::MakeProxy(std::move(source_client_)),
+ std::move(connection_request_));
}
} // namespace device
« no previous file with comments | « device/serial/serial_connection.cc ('k') | device/serial/serial_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698