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

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_finder_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/ble/bluetooth_low_energy_connection_finder_unittest.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
index 8133260c06373f1beae5e2252504cda8feb668ae..e5ba32cecb6cc3bb15e21e5956e43d715e17135f 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
@@ -5,6 +5,7 @@
#include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h"
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/macros.h"
@@ -132,7 +133,7 @@ class ProximityAuthBluetoothLowEnergyConnectionFinderTest
}
void OnConnectionFound(scoped_ptr<Connection> connection) {
- last_found_connection_ = connection.Pass();
+ last_found_connection_ = std::move(connection);
}
void FindAndExpectStartDiscovery(
@@ -151,7 +152,7 @@ class ProximityAuthBluetoothLowEnergyConnectionFinderTest
.WillByDefault(Return(true));
connection_finder.Find(connection_callback_);
ASSERT_FALSE(discovery_callback.is_null());
- discovery_callback.Run(discovery_session.Pass());
+ discovery_callback.Run(std::move(discovery_session));
}
void ExpectRemoveObserver() {
@@ -222,7 +223,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionFinderTest,
connection_finder.Find(connection_callback_);
ASSERT_FALSE(discovery_callback.is_null());
- discovery_callback.Run(discovery_session.Pass());
+ discovery_callback.Run(std::move(discovery_session));
EXPECT_CALL(*adapter_, RemoveObserver(_));
}
@@ -418,7 +419,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionFinderTest,
ON_CALL(*last_discovery_session_alias_, IsActive())
.WillByDefault(Return(true));
ASSERT_FALSE(discovery_callback.is_null());
- discovery_callback.Run(discovery_session.Pass());
+ discovery_callback.Run(std::move(discovery_session));
// Preparing to create a GATT connection to the right device.
PrepareDevice(kServiceUUID, kTestRemoteDeviceBluetoothAddress, true);
@@ -472,7 +473,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionFinderTest,
.WillByDefault(Return(true));
ASSERT_FALSE(discovery_callback.is_null());
- discovery_callback.Run(discovery_session.Pass());
+ discovery_callback.Run(std::move(discovery_session));
// Preparing to create a GATT connection to the right device.
PrepareDevice(kServiceUUID, kTestRemoteDeviceBluetoothAddress, true);

Powered by Google App Engine
This is Rietveld 408576698