| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/bluetooth/bluetooth_device_chromeos.h" | 5 #include "device/bluetooth/bluetooth_device_chromeos.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 DCHECK(service->GetUUID().IsValid()); | 516 DCHECK(service->GetUUID().IsValid()); |
| 517 | 517 |
| 518 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, | 518 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, |
| 519 GattServiceAdded(this, service)); | 519 GattServiceAdded(this, service)); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void BluetoothDeviceChromeOS::GattServiceRemoved( | 522 void BluetoothDeviceChromeOS::GattServiceRemoved( |
| 523 const dbus::ObjectPath& object_path) { | 523 const dbus::ObjectPath& object_path) { |
| 524 GattServiceMap::iterator iter = gatt_services_.find(object_path.value()); | 524 GattServiceMap::iterator iter = gatt_services_.find(object_path.value()); |
| 525 if (iter == gatt_services_.end()) { | 525 if (iter == gatt_services_.end()) { |
| 526 VLOG(2) << "Unknown GATT service removed: " << object_path.value(); | 526 VLOG(3) << "Unknown GATT service removed: " << object_path.value(); |
| 527 return; | 527 return; |
| 528 } | 528 } |
| 529 | 529 |
| 530 VLOG(1) << "Removing remote GATT service from device: " << GetAddress(); | 530 VLOG(1) << "Removing remote GATT service from device: " << GetAddress(); |
| 531 | 531 |
| 532 BluetoothRemoteGattServiceChromeOS* service = | 532 BluetoothRemoteGattServiceChromeOS* service = |
| 533 static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second); | 533 static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second); |
| 534 DCHECK(service->object_path() == object_path); | 534 DCHECK(service->object_path() == object_path); |
| 535 gatt_services_.erase(iter); | 535 gatt_services_.erase(iter); |
| 536 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, | 536 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 void BluetoothDeviceChromeOS::OnForgetError( | 714 void BluetoothDeviceChromeOS::OnForgetError( |
| 715 const ErrorCallback& error_callback, | 715 const ErrorCallback& error_callback, |
| 716 const std::string& error_name, | 716 const std::string& error_name, |
| 717 const std::string& error_message) { | 717 const std::string& error_message) { |
| 718 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " | 718 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " |
| 719 << error_name << ": " << error_message; | 719 << error_name << ": " << error_message; |
| 720 error_callback.Run(); | 720 error_callback.Run(); |
| 721 } | 721 } |
| 722 | 722 |
| 723 } // namespace chromeos | 723 } // namespace chromeos |
| OLD | NEW |