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

Unified Diff: device/bluetooth/bluetooth_device_android.cc

Issue 1411183003: bluetooth: android: Clean up BluetoothRemoteGattServiceAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-getid-
Patch Set: address ortuno Created 5 years, 2 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 | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_android.cc
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
index fccd24fb682780fa15fd134fae97db342178aeca..53478bb740ef57f708b972f11963d696e27b77b8 100644
--- a/device/bluetooth/bluetooth_device_android.cc
+++ b/device/bluetooth/bluetooth_device_android.cc
@@ -236,15 +236,14 @@ void BluetoothDeviceAndroid::CreateGattRemoteService(
if (gatt_services_.contains(instanceIdString))
return;
- BluetoothRemoteGattServiceAndroid* service =
- BluetoothRemoteGattServiceAndroid::Create(
- GetAdapter(), this, bluetooth_gatt_service_wrapper, instanceIdString);
-
- gatt_services_.set(instanceIdString,
- make_scoped_ptr<BluetoothGattService>(service));
+ BluetoothDevice::GattServiceMap::iterator service_iterator =
+ gatt_services_.set(instanceIdString,
+ BluetoothRemoteGattServiceAndroid::Create(
+ GetAdapter(), this, bluetooth_gatt_service_wrapper,
+ instanceIdString));
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, GetAdapter()->GetObservers(),
- GattServiceAdded(adapter_, this, service));
+ GattServiceAdded(adapter_, this, service_iterator->second));
}
BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter)
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698