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

Side by Side Diff: device/bluetooth/bluetooth_device_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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698