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

Unified Diff: components/arc/test/fake_bluetooth_instance.cc

Issue 2214263006: arc: bluetooth: Fix LSAN error in fake_bluetooth_instance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add #include <memory> for unique_ptr Created 4 years, 4 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 | « components/arc/test/fake_bluetooth_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_bluetooth_instance.cc
diff --git a/components/arc/test/fake_bluetooth_instance.cc b/components/arc/test/fake_bluetooth_instance.cc
index 4db55a223ed18625066ad13dd533189b77a02127..3d221fbdc095268a59ff1240f2b167a1545d860d 100644
--- a/components/arc/test/fake_bluetooth_instance.cc
+++ b/components/arc/test/fake_bluetooth_instance.cc
@@ -59,8 +59,8 @@ void FakeBluetoothInstance::OnLEDeviceFound(
mojom::BluetoothAddressPtr addr,
int32_t rssi,
mojo::Array<mojom::BluetoothAdvertisingDataPtr> adv_data) {
- le_device_found_data_.push_back(
- new LEDeviceFoundData(std::move(addr), rssi, std::move(adv_data)));
+ le_device_found_data_.push_back(base::MakeUnique<LEDeviceFoundData>(
+ std::move(addr), rssi, std::move(adv_data)));
}
void FakeBluetoothInstance::OnLEConnectionStateChange(
@@ -75,7 +75,7 @@ void FakeBluetoothInstance::OnGetGattDB(
mojom::BluetoothAddressPtr remote_addr,
mojo::Array<mojom::BluetoothGattDBElementPtr> db) {
gatt_db_result_.push_back(
- new GattDBResult(std::move(remote_addr), std::move(db)));
+ base::MakeUnique<GattDBResult>(std::move(remote_addr), std::move(db)));
}
void FakeBluetoothInstance::OnServicesRemoved(
« no previous file with comments | « components/arc/test/fake_bluetooth_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698