Chromium Code Reviews| Index: device/bluetooth/bluetooth_adapter.cc |
| diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc |
| index d9a24f05ad8c696a5d3ba29aa5564ad0155e77b6..a3964c8a4a2b771c606139c2d15b96acd780a4b2 100644 |
| --- a/device/bluetooth/bluetooth_adapter.cc |
| +++ b/device/bluetooth/bluetooth_adapter.cc |
| @@ -73,7 +73,12 @@ BluetoothDevice* BluetoothAdapter::GetDevice(const std::string& address) { |
| const BluetoothDevice* BluetoothAdapter::GetDevice( |
| const std::string& address) const { |
| - DevicesMap::const_iterator iter = devices_.find(address); |
| + std::string normalized_address = |
|
keybuk
2014/05/15 21:33:05
nit: canonicalized ;-)
Ilya Sherman
2014/05/15 21:42:29
Done.
|
| + BluetoothDevice::CanonicalizeAddress(address); |
| + if (normalized_address.empty()) |
| + return NULL; |
| + |
| + DevicesMap::const_iterator iter = devices_.find(normalized_address); |
| if (iter != devices_.end()) |
| return iter->second; |