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

Unified Diff: device/bluetooth/bluetooth_device_win_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/bluetooth_device_win.cc ('k') | device/bluetooth/bluetooth_discovery_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_win_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_win_unittest.cc b/device/bluetooth/bluetooth_device_win_unittest.cc
index d509296ac5a5ed052a23f695ca3659f9da19418d..b75d5385f79e674fd0eb504b6dac150b1b36721d 100644
--- a/device/bluetooth/bluetooth_device_win_unittest.cc
+++ b/device/bluetooth/bluetooth_device_win_unittest.cc
@@ -5,8 +5,10 @@
#include "device/bluetooth/bluetooth_device_win.h"
#include <memory>
+#include <utility>
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/test_simple_task_runner.h"
@@ -52,17 +54,17 @@ class BluetoothDeviceWinTest : public testing::Test {
device_state_->name = std::string(kDeviceName);
device_state_->address = kDeviceAddress;
- BluetoothTaskManagerWin::ServiceRecordState* audio_state =
- new BluetoothTaskManagerWin::ServiceRecordState();
+ auto audio_state =
+ base::MakeUnique<BluetoothTaskManagerWin::ServiceRecordState>();
audio_state->name = kTestAudioSdpName;
base::HexStringToBytes(kTestAudioSdpBytes, &audio_state->sdp_bytes);
- device_state_->service_record_states.push_back(audio_state);
+ device_state_->service_record_states.push_back(std::move(audio_state));
- BluetoothTaskManagerWin::ServiceRecordState* video_state =
- new BluetoothTaskManagerWin::ServiceRecordState();
+ auto video_state =
+ base::MakeUnique<BluetoothTaskManagerWin::ServiceRecordState>();
video_state->name = kTestVideoSdpName;
base::HexStringToBytes(kTestVideoSdpBytes, &video_state->sdp_bytes);
- device_state_->service_record_states.push_back(video_state);
+ device_state_->service_record_states.push_back(std::move(video_state));
device_.reset(new BluetoothDeviceWin(NULL, *device_state_, ui_task_runner,
socket_thread, NULL,
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | device/bluetooth/bluetooth_discovery_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698