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

Unified Diff: device/bluetooth/bluetooth_profile_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
Index: device/bluetooth/bluetooth_profile_chromeos.cc
diff --git a/device/bluetooth/bluetooth_profile_chromeos.cc b/device/bluetooth/bluetooth_profile_chromeos.cc
index 704b68c54b7354d1ff80489621193505cc2463cd..7d6b786fa460066b71f04b1582cc24061789b7e9 100644
--- a/device/bluetooth/bluetooth_profile_chromeos.cc
+++ b/device/bluetooth/bluetooth_profile_chromeos.cc
@@ -69,13 +69,13 @@ BluetoothProfileChromeOS::~BluetoothProfileChromeOS() {
}
void BluetoothProfileChromeOS::Init(
- const std::string& uuid,
+ const device::BluetoothUUID& uuid,
const device::BluetoothProfile::Options& options,
const ProfileCallback& callback) {
DCHECK(object_path_.value().empty());
DCHECK(profile_.get() == NULL);
- if (!BluetoothDevice::IsUUIDValid(uuid)) {
+ if (!uuid.IsValid()) {
callback.Run(NULL);
return;
}
@@ -83,7 +83,7 @@ void BluetoothProfileChromeOS::Init(
uuid_ = uuid;
options_.name = options.name;
- options_.service = uuid;
+ options_.service = uuid.canonical_value();
options_.channel = options.channel;
options_.psm = options.psm;
options_.require_authentication = options.require_authentication;
@@ -95,7 +95,7 @@ void BluetoothProfileChromeOS::Init(
// The object path is relatively meaningless, but has to be unique, so we
// use the UUID of the profile.
std::string uuid_path;
- base::ReplaceChars(uuid, ":-", "_", &uuid_path);
+ base::ReplaceChars(uuid.canonical_value(), ":-", "_", &uuid_path);
object_path_ = dbus::ObjectPath("/org/chromium/bluetooth_profile/" +
uuid_path);
@@ -143,7 +143,7 @@ void BluetoothProfileChromeOS::AdapterPresentChanged(BluetoothAdapter* adapter,
DBusThreadManager::Get()->GetBluetoothProfileManagerClient()->
RegisterProfile(
object_path_,
- uuid_,
+ uuid_.canonical_value(),
options_,
base::Bind(&BluetoothProfileChromeOS::OnInternalRegisterProfile,
weak_ptr_factory_.GetWeakPtr()),
@@ -162,7 +162,7 @@ void BluetoothProfileChromeOS::OnGetAdapter(
DBusThreadManager::Get()->GetBluetoothProfileManagerClient()->
RegisterProfile(
object_path_,
- uuid_,
+ uuid_.canonical_value(),
options_,
base::Bind(&BluetoothProfileChromeOS::OnRegisterProfile,
weak_ptr_factory_.GetWeakPtr(),
« no previous file with comments | « device/bluetooth/bluetooth_profile_chromeos.h ('k') | device/bluetooth/bluetooth_profile_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698