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

Unified Diff: components/proximity_auth/bluetooth_connection_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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
Index: components/proximity_auth/bluetooth_connection_unittest.cc
diff --git a/components/proximity_auth/bluetooth_connection_unittest.cc b/components/proximity_auth/bluetooth_connection_unittest.cc
index d1f04304d290d17d9d8b203beb82a1a9a8e4a294..8782bbcfa43d01cf87029b618463fec87c5b73ab 100644
--- a/components/proximity_auth/bluetooth_connection_unittest.cc
+++ b/components/proximity_auth/bluetooth_connection_unittest.cc
@@ -4,6 +4,8 @@
#include "components/proximity_auth/bluetooth_connection.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/numerics/safe_conversions.h"
@@ -401,7 +403,7 @@ TEST_F(ProximityAuthBluetoothConnectionTest,
scoped_ptr<TestWireMessage> wire_message(new TestWireMessage);
EXPECT_CALL(*socket_, Send(_, kSerializedMessageLength, _, _))
.WillOnce(SaveArg<0>(&buffer));
- connection.SendMessage(wire_message.Pass());
+ connection.SendMessage(std::move(wire_message));
ASSERT_TRUE(buffer.get());
EXPECT_EQ(kSerializedMessage,
std::string(buffer->data(), kSerializedMessageLength));
@@ -422,7 +424,7 @@ TEST_F(ProximityAuthBluetoothConnectionTest, SendMessage_Success) {
device::BluetoothSocket::SendCompletionCallback callback;
EXPECT_CALL(*socket_, Send(_, _, _, _)).WillOnce(SaveArg<2>(&callback));
- connection.SendMessage(wire_message.Pass());
+ connection.SendMessage(std::move(wire_message));
ASSERT_FALSE(callback.is_null());
EXPECT_CALL(connection, OnDidSendMessage(Ref(*expected_wire_message), true));
@@ -444,7 +446,7 @@ TEST_F(ProximityAuthBluetoothConnectionTest, SendMessage_Failure) {
device::BluetoothSocket::ErrorCompletionCallback error_callback;
EXPECT_CALL(*socket_, Send(_, _, _, _)).WillOnce(SaveArg<3>(&error_callback));
- connection.SendMessage(wire_message.Pass());
+ connection.SendMessage(std::move(wire_message));
ASSERT_FALSE(error_callback.is_null());
EXPECT_CALL(connection, OnDidSendMessage(Ref(*expected_wire_message), false));

Powered by Google App Engine
This is Rietveld 408576698