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

Unified Diff: device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc

Issue 2567903004: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map (Closed)
Patch Set: Mac bustage Created 4 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: device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
index 51fc4360e51739bdc4a7e34fb3276c5d58864435..f79078a5a3dcd1ec357844f8bc66d3e4c1405ae1 100644
--- a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
@@ -259,7 +259,7 @@ class BluetoothGattBlueZTest : public testing::Test {
void NotifySessionCallback(
std::unique_ptr<BluetoothGattNotifySession> session) {
++success_callback_count_;
- update_sessions_.push_back(session.release());
+ update_sessions_.push_back(std::move(session));
QuitMessageLoop();
}
@@ -295,7 +295,7 @@ class BluetoothGattBlueZTest : public testing::Test {
bluez::FakeBluetoothGattDescriptorClient*
fake_bluetooth_gatt_descriptor_client_;
std::unique_ptr<device::BluetoothGattConnection> gatt_conn_;
- ScopedVector<BluetoothGattNotifySession> update_sessions_;
+ std::vector<std::unique_ptr<BluetoothGattNotifySession>> update_sessions_;
scoped_refptr<BluetoothAdapter> adapter_;
int success_callback_count_;
@@ -1433,7 +1433,7 @@ TEST_F(BluetoothGattBlueZTest, NotifySessions) {
// Stop one of the sessions. The session should become inactive but the
// characteristic should still be notifying.
- BluetoothGattNotifySession* session = update_sessions_[0];
+ BluetoothGattNotifySession* session = update_sessions_[0].get();
EXPECT_TRUE(session->IsActive());
session->Stop(base::Bind(&BluetoothGattBlueZTest::SuccessCallback,
base::Unretained(this)));

Powered by Google App Engine
This is Rietveld 408576698