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

Unified Diff: device/serial/data_source_sender.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/data_sink_unittest.cc ('k') | device/serial/data_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_source_sender.cc
diff --git a/device/serial/data_source_sender.cc b/device/serial/data_source_sender.cc
index 5b4299239560be45c0cc927f84e48aa57f7d3c1a..af2ddcb40cf6e37ad2e1b90c07027c562593aaf6 100644
--- a/device/serial/data_source_sender.cc
+++ b/device/serial/data_source_sender.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <limits>
+#include <utility>
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
@@ -76,8 +77,8 @@ DataSourceSender::DataSourceSender(
mojo::InterfacePtr<serial::DataSourceClient> client,
const ReadyCallback& ready_callback,
const ErrorCallback& error_callback)
- : binding_(this, source.Pass()),
- client_(client.Pass()),
+ : binding_(this, std::move(source)),
+ client_(std::move(client)),
ready_callback_(ready_callback),
error_callback_(error_callback),
available_buffer_capacity_(0),
@@ -162,7 +163,7 @@ void DataSourceSender::DoneInternal(const std::vector<char>& data) {
if (!data.empty()) {
mojo::Array<uint8_t> data_to_send(data.size());
std::copy(data.begin(), data.end(), &data_to_send[0]);
- client_->OnData(data_to_send.Pass());
+ client_->OnData(std::move(data_to_send));
}
pending_send_.reset();
}
« no previous file with comments | « device/serial/data_sink_unittest.cc ('k') | device/serial/data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698