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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 224893002: device/bluetooth: Rename device::bluetooth_utils::UUID to device::BluetoothUUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « device/bluetooth/bluetooth_device_chromeos.h ('k') | device/bluetooth/bluetooth_device_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_chromeos.cc
diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc
index a7c7b83f10f7918fb3cc3a0e0536a773de5c617e..f42f3ee25bda55c7e37cabf5822a879a3eaad9be 100644
--- a/device/bluetooth/bluetooth_device_chromeos.cc
+++ b/device/bluetooth/bluetooth_device_chromeos.cc
@@ -219,7 +219,15 @@ BluetoothDeviceChromeOS::UUIDList BluetoothDeviceChromeOS::GetUUIDs() const {
GetProperties(object_path_);
DCHECK(properties);
- return properties->uuids.value();
+ std::vector<device::BluetoothUUID> uuids;
+ const std::vector<std::string> &dbus_uuids = properties->uuids.value();
+ for (std::vector<std::string>::const_iterator iter = dbus_uuids.begin();
+ iter != dbus_uuids.end(); ++iter) {
+ device::BluetoothUUID uuid(*iter);
+ DCHECK(uuid.IsValid());
+ uuids.push_back(uuid);
+ }
+ return uuids;
}
bool BluetoothDeviceChromeOS::ExpectingPinCode() const {
@@ -344,7 +352,7 @@ void BluetoothDeviceChromeOS::Forget(const ErrorCallback& error_callback) {
}
void BluetoothDeviceChromeOS::ConnectToService(
- const std::string& service_uuid,
+ const device::BluetoothUUID& service_uuid,
const SocketCallback& callback) {
// TODO(keybuk): implement
callback.Run(scoped_refptr<device::BluetoothSocket>());
@@ -357,11 +365,11 @@ void BluetoothDeviceChromeOS::ConnectToProfile(
BluetoothProfileChromeOS* profile_chromeos =
static_cast<BluetoothProfileChromeOS*>(profile);
VLOG(1) << object_path_.value() << ": Connecting profile: "
- << profile_chromeos->uuid();
+ << profile_chromeos->uuid().canonical_value();
DBusThreadManager::Get()->GetBluetoothDeviceClient()->
ConnectProfile(
object_path_,
- profile_chromeos->uuid(),
+ profile_chromeos->uuid().canonical_value(),
base::Bind(
&BluetoothDeviceChromeOS::OnConnectProfile,
weak_ptr_factory_.GetWeakPtr(),
@@ -567,7 +575,7 @@ void BluetoothDeviceChromeOS::OnConnectProfile(
BluetoothProfileChromeOS* profile_chromeos =
static_cast<BluetoothProfileChromeOS*>(profile);
VLOG(1) << object_path_.value() << ": Profile connected: "
- << profile_chromeos->uuid();
+ << profile_chromeos->uuid().canonical_value();
callback.Run();
}
@@ -579,7 +587,7 @@ void BluetoothDeviceChromeOS::OnConnectProfileError(
BluetoothProfileChromeOS* profile_chromeos =
static_cast<BluetoothProfileChromeOS*>(profile);
VLOG(1) << object_path_.value() << ": Profile connection failed: "
- << profile_chromeos->uuid() << ": "
+ << profile_chromeos->uuid().canonical_value() << ": "
<< error_name << ": " << error_message;
error_callback.Run();
}
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.h ('k') | device/bluetooth/bluetooth_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698