| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 return properties->alias.value(); | 188 return properties->alias.value(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 std::string BluetoothDeviceChromeOS::GetAddress() const { | 191 std::string BluetoothDeviceChromeOS::GetAddress() const { |
| 192 BluetoothDeviceClient::Properties* properties = | 192 BluetoothDeviceClient::Properties* properties = |
| 193 DBusThreadManager::Get()->GetBluetoothDeviceClient()-> | 193 DBusThreadManager::Get()->GetBluetoothDeviceClient()-> |
| 194 GetProperties(object_path_); | 194 GetProperties(object_path_); |
| 195 DCHECK(properties); | 195 DCHECK(properties); |
| 196 | 196 |
| 197 return properties->address.value(); | 197 return CanonicalizeAddress(properties->address.value()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 BluetoothDevice::VendorIDSource | 200 BluetoothDevice::VendorIDSource |
| 201 BluetoothDeviceChromeOS::GetVendorIDSource() const { | 201 BluetoothDeviceChromeOS::GetVendorIDSource() const { |
| 202 VendorIDSource vendor_id_source = VENDOR_ID_UNKNOWN; | 202 VendorIDSource vendor_id_source = VENDOR_ID_UNKNOWN; |
| 203 ParseModalias(object_path_, &vendor_id_source, NULL, NULL, NULL); | 203 ParseModalias(object_path_, &vendor_id_source, NULL, NULL, NULL); |
| 204 return vendor_id_source; | 204 return vendor_id_source; |
| 205 } | 205 } |
| 206 | 206 |
| 207 uint16 BluetoothDeviceChromeOS::GetVendorID() const { | 207 uint16 BluetoothDeviceChromeOS::GetVendorID() const { |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 void BluetoothDeviceChromeOS::OnForgetError( | 715 void BluetoothDeviceChromeOS::OnForgetError( |
| 716 const ErrorCallback& error_callback, | 716 const ErrorCallback& error_callback, |
| 717 const std::string& error_name, | 717 const std::string& error_name, |
| 718 const std::string& error_message) { | 718 const std::string& error_message) { |
| 719 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " | 719 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " |
| 720 << error_name << ": " << error_message; | 720 << error_name << ": " << error_message; |
| 721 error_callback.Run(); | 721 error_callback.Run(); |
| 722 } | 722 } |
| 723 | 723 |
| 724 } // namespace chromeos | 724 } // namespace chromeos |
| OLD | NEW |