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

Unified Diff: device/serial/data_sink_receiver.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_sender.cc ('k') | device/serial/data_sink_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_sink_receiver.cc
diff --git a/device/serial/data_sink_receiver.cc b/device/serial/data_sink_receiver.cc
index 64ddea168c774aad1ddfe78e46c40b2160442f48..e1d2b9c28a3a487f1ca4ed5cb6b94ec997ec6f51 100644
--- a/device/serial/data_sink_receiver.cc
+++ b/device/serial/data_sink_receiver.cc
@@ -5,6 +5,7 @@
#include "device/serial/data_sink_receiver.h"
#include <limits>
+#include <utility>
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
@@ -71,7 +72,7 @@ DataSinkReceiver::DataSinkReceiver(
const ReadyCallback& ready_callback,
const CancelCallback& cancel_callback,
const ErrorCallback& error_callback)
- : binding_(this, request.Pass()),
+ : binding_(this, std::move(request)),
ready_callback_(ready_callback),
cancel_callback_(cancel_callback),
error_callback_(error_callback),
@@ -123,7 +124,7 @@ void DataSinkReceiver::OnData(
return;
}
pending_data_buffers_.push(
- linked_ptr<DataFrame>(new DataFrame(data.Pass(), callback)));
+ linked_ptr<DataFrame>(new DataFrame(std::move(data), callback)));
if (!buffer_in_use_)
RunReadyCallback();
}
@@ -254,7 +255,7 @@ void DataSinkReceiver::Buffer::DoneWithError(uint32_t bytes_read,
DataSinkReceiver::DataFrame::DataFrame(
mojo::Array<uint8_t> data,
const mojo::Callback<void(uint32_t, int32_t)>& callback)
- : data_(data.Pass()), offset_(0), callback_(callback) {
+ : data_(std::move(data)), offset_(0), callback_(callback) {
DCHECK_LT(0u, data_.size());
}
« no previous file with comments | « device/serial/data_sender.cc ('k') | device/serial/data_sink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698