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

Unified Diff: device/bluetooth/bluetooth_adapter.cc

Issue 288903003: [Bluetooth] Standardize Bluetooth device address format to XX:XX:XX:XX:XX:XX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS tests too Created 6 years, 7 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 | « chromeos/dbus/fake_bluetooth_adapter_client.cc ('k') | device/bluetooth/bluetooth_adapter_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter.cc
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
index d9a24f05ad8c696a5d3ba29aa5564ad0155e77b6..1f5922292d0db2dc0230d289b4cd5252c0858914 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 canonicalized_address =
+ BluetoothDevice::CanonicalizeAddress(address);
+ if (canonicalized_address.empty())
+ return NULL;
+
+ DevicesMap::const_iterator iter = devices_.find(canonicalized_address);
if (iter != devices_.end())
return iter->second;
« no previous file with comments | « chromeos/dbus/fake_bluetooth_adapter_client.cc ('k') | device/bluetooth/bluetooth_adapter_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698