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

Unified Diff: device/bluetooth/bluetooth_device_win_unittest.cc

Issue 2567903004: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map (Closed)
Patch Set: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map 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/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..dbc0fc65d681ec8488dd91aced8ceddecc252bdc 100644
--- a/device/bluetooth/bluetooth_device_win_unittest.cc
+++ b/device/bluetooth/bluetooth_device_win_unittest.cc
@@ -52,17 +52,17 @@ class BluetoothDeviceWinTest : public testing::Test {
device_state_->name = std::string(kDeviceName);
device_state_->address = kDeviceAddress;
- BluetoothTaskManagerWin::ServiceRecordState* audio_state =
- new BluetoothTaskManagerWin::ServiceRecordState();
+ std::unique_ptr<BluetoothTaskManagerWin::ServiceRecordState> audio_state(
+ new 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();
+ std::unique_ptr<BluetoothTaskManagerWin::ServiceRecordState> video_state(
+ new 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));
Reilly Grant (use Gerrit) 2016/12/21 22:25:14 base::MakeUnique in this file.
dougt 2016/12/22 01:18:02 Done.
device_.reset(new BluetoothDeviceWin(NULL, *device_state_, ui_task_runner,
socket_thread, NULL,

Powered by Google App Engine
This is Rietveld 408576698