| Index: device/bluetooth/bluetooth_device_chromeos.cc
|
| diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc
|
| index f6072470c38a0293d08bbd8b5a5ccfb56a085272..0f1f273cb54b9b0e5f9e7a69781fcf28e63169af 100644
|
| --- a/device/bluetooth/bluetooth_device_chromeos.cc
|
| +++ b/device/bluetooth/bluetooth_device_chromeos.cc
|
| @@ -153,24 +153,13 @@ BluetoothDeviceChromeOS::~BluetoothDeviceChromeOS() {
|
| gatt_services_.clear();
|
| for (GattServiceMap::iterator iter = gatt_services.begin();
|
| iter != gatt_services.end(); ++iter) {
|
| - FOR_EACH_OBSERVER(BluetoothDevice::Observer, observers_,
|
| - GattServiceRemoved(this, iter->second));
|
| + DCHECK(adapter_);
|
| + adapter_->NotifyGattServiceRemoved(
|
| + static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second));
|
| delete iter->second;
|
| }
|
| }
|
|
|
| -void BluetoothDeviceChromeOS::AddObserver(
|
| - device::BluetoothDevice::Observer* observer) {
|
| - DCHECK(observer);
|
| - observers_.AddObserver(observer);
|
| -}
|
| -
|
| -void BluetoothDeviceChromeOS::RemoveObserver(
|
| - device::BluetoothDevice::Observer* observer) {
|
| - DCHECK(observer);
|
| - observers_.RemoveObserver(observer);
|
| -}
|
| -
|
| uint32 BluetoothDeviceChromeOS::GetBluetoothClass() const {
|
| BluetoothDeviceClient::Properties* properties =
|
| DBusThreadManager::Get()->GetBluetoothDeviceClient()->
|
| @@ -510,8 +499,8 @@ void BluetoothDeviceChromeOS::GattServiceAdded(
|
| DCHECK(service->object_path() == object_path);
|
| DCHECK(service->GetUUID().IsValid());
|
|
|
| - FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_,
|
| - GattServiceAdded(this, service));
|
| + DCHECK(adapter_);
|
| + adapter_->NotifyGattServiceAdded(service);
|
| }
|
|
|
| void BluetoothDeviceChromeOS::GattServiceRemoved(
|
| @@ -528,8 +517,10 @@ void BluetoothDeviceChromeOS::GattServiceRemoved(
|
| static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second);
|
| DCHECK(service->object_path() == object_path);
|
| gatt_services_.erase(iter);
|
| - FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_,
|
| - GattServiceRemoved(this, service));
|
| +
|
| + DCHECK(adapter_);
|
| + adapter_->NotifyGattServiceRemoved(service);
|
| +
|
| delete service;
|
| }
|
|
|
|
|