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

Unified Diff: device/serial/data_sink_unittest.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_receiver.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_sink_unittest.cc
diff --git a/device/serial/data_sink_unittest.cc b/device/serial/data_sink_unittest.cc
index 2b177917c8b7c2235ee19822ea3afae3cfae132d..a5872f5c6057389fbfebd19464bdb1c98cd7e7ef 100644
--- a/device/serial/data_sink_unittest.cc
+++ b/device/serial/data_sink_unittest.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/macros.h"
@@ -47,7 +48,8 @@ class DataSinkTest : public testing::Test {
base::Bind(&DataSinkTest::OnDataToRead, base::Unretained(this)),
base::Bind(&DataSinkTest::OnCancel, base::Unretained(this)),
base::Bind(&DataSinkTest::OnError, base::Unretained(this)));
- sender_.reset(new DataSender(sink_handle.Pass(), kBufferSize, kFatalError));
+ sender_.reset(
+ new DataSender(std::move(sink_handle), kBufferSize, kFatalError));
}
void TearDown() override {
@@ -158,7 +160,7 @@ class DataSinkTest : public testing::Test {
}
void OnDataToRead(scoped_ptr<ReadOnlyBuffer> buffer) {
- read_buffer_ = buffer.Pass();
+ read_buffer_ = std::move(buffer);
read_buffer_contents_ =
std::string(read_buffer_->GetData(), read_buffer_->GetSize());
EventReceived(EVENT_READ_BUFFER_READY);
« no previous file with comments | « device/serial/data_sink_receiver.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698