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

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

Issue 2614753004: Remove ScopedVector from bluetooth. (Closed)
Patch Set: last win bits Created 3 years, 11 months 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..5db8d4fb748e3831d8f896ea2b2a2ba43c74bddc 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -7,9 +7,9 @@
#include <memory>
#include <utility>
+#include <vector>
#include "base/bind_helpers.h"
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -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 (const 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,7 @@ 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:
« no previous file with comments | « device/bluetooth/bluetooth_task_manager_win.cc ('k') | device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698