| Index: device/bluetooth/bluetooth_device_android.cc
|
| diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
|
| index ce76d20b169b8667980d7833366732b7a95be885..6e474728319c5dd86b685413466b849ff0e6e173 100644
|
| --- a/device/bluetooth/bluetooth_device_android.cc
|
| +++ b/device/bluetooth/bluetooth_device_android.cc
|
| @@ -245,18 +245,15 @@ void BluetoothDeviceAndroid::CreateGattRemoteService(
|
| bluetooth_gatt_service_wrapper) { // BluetoothGattServiceWrapper
|
| std::string instance_id_string =
|
| base::android::ConvertJavaStringToUTF8(env, instance_id);
|
| -
|
| - if (gatt_services_.contains(instance_id_string))
|
| + if (base::ContainsKey(gatt_services_, instance_id_string))
|
| return;
|
|
|
| - BluetoothDevice::GattServiceMap::iterator service_iterator =
|
| - gatt_services_.set(
|
| - instance_id_string,
|
| - BluetoothRemoteGattServiceAndroid::Create(
|
| - GetAndroidAdapter(), this, bluetooth_gatt_service_wrapper,
|
| - instance_id_string, j_device_));
|
| -
|
| - adapter_->NotifyGattServiceAdded(service_iterator->second);
|
| + auto service = BluetoothRemoteGattServiceAndroid::Create(
|
| + GetAndroidAdapter(), this, bluetooth_gatt_service_wrapper,
|
| + instance_id_string, j_device_);
|
| + auto insertion = gatt_services_.insert(
|
| + std::make_pair(instance_id_string, std::move(service)));
|
| + adapter_->NotifyGattServiceAdded(insertion.first->second.get());
|
| }
|
|
|
| BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter)
|
|
|