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

Unified Diff: device/bluetooth/bluez/bluetooth_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_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
index eb7784452d5a2d1532eebf914216ead4fe792370..505da050c109d214314046c91f9ef2fce98438aa 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -214,10 +214,7 @@ class BluetoothBlueZTest : public testing::Test {
}
void TearDown() override {
- for (ScopedVector<BluetoothDiscoverySession>::iterator iter =
- discovery_sessions_.begin();
- iter != discovery_sessions_.end(); ++iter) {
- BluetoothDiscoverySession* session = *iter;
+ for (auto& session : discovery_sessions_) {
if (!session->IsActive())
continue;
callback_count_ = 0;
@@ -245,7 +242,7 @@ class BluetoothBlueZTest : public testing::Test {
void DiscoverySessionCallback(
std::unique_ptr<BluetoothDiscoverySession> discovery_session) {
++callback_count_;
- discovery_sessions_.push_back(discovery_session.release());
+ discovery_sessions_.push_back(std::move(discovery_session));
QuitMessageLoop();
}
@@ -358,7 +355,8 @@ class BluetoothBlueZTest : public testing::Test {
int error_callback_count_;
enum BluetoothDevice::ConnectErrorCode last_connect_error_;
std::string last_client_error_;
- ScopedVector<BluetoothDiscoverySession> discovery_sessions_;
+
+ std::vector<std::unique_ptr<BluetoothDiscoverySession>> discovery_sessions_;
BluetoothAdapterProfileBlueZ* adapter_profile_;
private:

Powered by Google App Engine
This is Rietveld 408576698