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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_event_router.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: chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
index 67a19d4ba73dc112403e61aeb49a94c8827873be..41bba4c9899b1812ec4095c081b8b00691c7e8aa 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 =

Powered by Google App Engine
This is Rietveld 408576698