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

Unified Diff: content/browser/bluetooth/bluetooth_allowed_devices_map.h

Issue 1527853002: bluetooth: Add disconnect function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-device-identifier
Patch Set: Address jyasskin's comments Created 4 years, 11 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: content/browser/bluetooth/bluetooth_allowed_devices_map.h
diff --git a/content/browser/bluetooth/bluetooth_allowed_devices_map.h b/content/browser/bluetooth/bluetooth_allowed_devices_map.h
index caebb3a9919bac0e5e8b61429b54cc69582d7643..7f8e148db72262a1f11609209f236cc779e56b3d 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices_map.h
+++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.h
@@ -64,7 +64,7 @@ class CONTENT_EXPORT BluetoothAllowedDevicesMap final {
typedef std::map<std::string, std::string> DeviceIdToAddressMap;
typedef std::map<std::string, std::set<std::string>> DeviceIdToServicesMap;
- // Returns an id guaranteed to be unique for the origin. The id is randomly
+ // Returns an id guaranteed to be unique for the map. The id is randomly
// generated so that an origin can't guess the ID used in another origin.
std::string GenerateDeviceId(const url::Origin& origin);
std::set<std::string> UnionOfServices(
@@ -77,6 +77,9 @@ class CONTENT_EXPORT BluetoothAllowedDevicesMap final {
origin_to_device_id_to_address_map_;
std::map<url::Origin, DeviceIdToServicesMap>
origin_to_device_id_to_services_map_;
+
+ // Keep track of all device_ids in the map.
+ std::set<std::string> device_id_set_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698