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

Side by Side Diff: device/bluetooth/bluetooth_adapter_chromeos.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: git add unittest 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_adapter_chromeos.h" 5 #include "device/bluetooth/bluetooth_adapter_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 std::string BluetoothAdapterChromeOS::GetAddress() const { 122 std::string BluetoothAdapterChromeOS::GetAddress() const {
123 if (!IsPresent()) 123 if (!IsPresent())
124 return std::string(); 124 return std::string();
125 125
126 BluetoothAdapterClient::Properties* properties = 126 BluetoothAdapterClient::Properties* properties =
127 DBusThreadManager::Get()->GetBluetoothAdapterClient()-> 127 DBusThreadManager::Get()->GetBluetoothAdapterClient()->
128 GetProperties(object_path_); 128 GetProperties(object_path_);
129 DCHECK(properties); 129 DCHECK(properties);
130 130
131 return properties->address.value(); 131 return BluetoothDevice::CanonicalizeAddress(properties->address.value());
132 } 132 }
133 133
134 std::string BluetoothAdapterChromeOS::GetName() const { 134 std::string BluetoothAdapterChromeOS::GetName() const {
135 if (!IsPresent()) 135 if (!IsPresent())
136 return std::string(); 136 return std::string();
137 137
138 BluetoothAdapterClient::Properties* properties = 138 BluetoothAdapterClient::Properties* properties =
139 DBusThreadManager::Get()->GetBluetoothAdapterClient()-> 139 DBusThreadManager::Get()->GetBluetoothAdapterClient()->
140 GetProperties(object_path_); 140 GetProperties(object_path_);
141 DCHECK(properties); 141 DCHECK(properties);
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 933
934 // If the queued request resulted in a pending call, then let it 934 // If the queued request resulted in a pending call, then let it
935 // asynchonously process the remaining queued requests once the pending 935 // asynchonously process the remaining queued requests once the pending
936 // call returns. 936 // call returns.
937 if (discovery_request_pending_) 937 if (discovery_request_pending_)
938 return; 938 return;
939 } 939 }
940 } 940 }
941 941
942 } // namespace chromeos 942 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698