diff options
author | leon.han <leon.han@intel.com> | 2015-10-07 08:51:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-07 15:52:30 +0000 |
commit | 8685e05b627bb2e7ab0d4b3593272c71c375feb5 (patch) | |
tree | ce020061a0b7090b26b12c26ddcb8075438295ed /device/bluetooth/bluetooth_adapter_mac_unittest.mm | |
parent | 1ad34057f05597b29de0f3231afd2419eddad1dd (diff) | |
download | chromium_src-8685e05b627bb2e7ab0d4b3593272c71c375feb5.zip chromium_src-8685e05b627bb2e7ab0d4b3593272c71c375feb5.tar.gz chromium_src-8685e05b627bb2e7ab0d4b3593272c71c375feb5.tar.bz2 |
Bluetooth: Store devices_ in BluetoothAdapter with scoped pointers.
This CL uses ScopedPtrMap to store devices_ in BluetoothAdapter.
Currently raw pointers are stored and require manual deletion.
BUG=506416
Review URL: https://codereview.chromium.org/1343933004
Cr-Commit-Position: refs/heads/master@{#352848}
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_mac_unittest.mm')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_mac_unittest.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm index 147b50b..34a2d2e 100644 --- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm +++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm @@ -95,7 +95,8 @@ class BluetoothAdapterMacTest : public testing::Test { } void AddLowEnergyDevice(BluetoothLowEnergyDeviceMac* device) { - adapter_mac_->devices_[device->GetAddress()] = device; + adapter_mac_->devices_.set(device->GetAddress(), + scoped_ptr<BluetoothDevice>(device)); } int NumDevices() { return adapter_mac_->devices_.size(); } |