summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc')
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
index 67a19d4..41bba4c 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
@@ -110,7 +110,7 @@ bool BluetoothEventRouter::ReleaseSocket(int id) {
}
void BluetoothEventRouter::AddProfile(
- const std::string& uuid,
+ const device::BluetoothUUID& uuid,
const std::string& extension_id,
device::BluetoothProfile* bluetooth_profile) {
DCHECK(!HasProfile(uuid));
@@ -118,7 +118,7 @@ void BluetoothEventRouter::AddProfile(
bluetooth_profile_map_[uuid] = record;
}
-void BluetoothEventRouter::RemoveProfile(const std::string& uuid) {
+void BluetoothEventRouter::RemoveProfile(const device::BluetoothUUID& uuid) {
BluetoothProfileMap::iterator iter = bluetooth_profile_map_.find(uuid);
if (iter != bluetooth_profile_map_.end()) {
device::BluetoothProfile* bluetooth_profile = iter->second.profile;
@@ -127,7 +127,7 @@ void BluetoothEventRouter::RemoveProfile(const std::string& uuid) {
}
}
-bool BluetoothEventRouter::HasProfile(const std::string& uuid) const {
+bool BluetoothEventRouter::HasProfile(const device::BluetoothUUID& uuid) const {
return bluetooth_profile_map_.find(uuid) != bluetooth_profile_map_.end();
}
@@ -176,7 +176,7 @@ void BluetoothEventRouter::StopDiscoverySession(
}
device::BluetoothProfile* BluetoothEventRouter::GetProfile(
- const std::string& uuid) const {
+ const device::BluetoothUUID& uuid) const {
BluetoothProfileMap::const_iterator iter = bluetooth_profile_map_.find(uuid);
if (iter != bluetooth_profile_map_.end())
return iter->second.profile;
@@ -193,7 +193,7 @@ scoped_refptr<device::BluetoothSocket> BluetoothEventRouter::GetSocket(int id) {
void BluetoothEventRouter::DispatchConnectionEvent(
const std::string& extension_id,
- const std::string& uuid,
+ const device::BluetoothUUID& uuid,
const device::BluetoothDevice* device,
scoped_refptr<device::BluetoothSocket> socket) {
if (!HasProfile(uuid))
@@ -202,7 +202,7 @@ void BluetoothEventRouter::DispatchConnectionEvent(
int socket_id = RegisterSocket(extension_id, socket);
bluetooth::Socket result_socket;
bluetooth::BluetoothDeviceToApiDevice(*device, &result_socket.device);
- result_socket.profile.uuid = uuid;
+ result_socket.profile.uuid = uuid.canonical_value();
result_socket.id = socket_id;
scoped_ptr<base::ListValue> args =