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

Unified Diff: device/bluetooth/bluez/bluetooth_gatt_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
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c16d53019d946fba31c2071a49724f71f94d839..d8538b6e0734214fa8b8e1704f42931132fd4edc 100644
--- a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
@@ -7,8 +7,8 @@
#include <memory>
#include <utility>
+#include <vector>
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "dbus/object_path.h"
@@ -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_;
@@ -1434,7 +1434,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)));
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698