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

Unified Diff: content/renderer/bluetooth/web_bluetooth_impl.h

Issue 2019853002: bluetooth: Use WebBluetoothDeviceId instead of string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-uuid-typemap
Patch Set: Fix build Created 4 years, 5 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/renderer/bluetooth/web_bluetooth_impl.h
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h
index 13d7c7b9a184704d660f643063075bedc227ddee..2c588064e92acbd96a54e208dde63e72d8ebb5bf 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.h
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h
@@ -86,7 +86,8 @@ class CONTENT_EXPORT WebBluetoothImpl
void RemoteCharacteristicValueChanged(
const mojo::String& characteristic_instance_id,
mojo::Array<uint8_t> value) override;
- void GattServerDisconnected(const mojo::String& device_id) override;
+ void GattServerDisconnected(
+ const web_bluetooth::WebBluetoothDeviceId& device_id) override;
// Callbacks for WebBluetoothService calls:
void OnRequestDeviceComplete(
@@ -140,7 +141,9 @@ class CONTENT_EXPORT WebBluetoothImpl
// Map of device_ids to WebBluetoothDevices. Added in connect() and removed in
// disconnect(). This means a device may not actually be connected while in
// this map, but that it will definitely be removed when the page navigates.
- std::unordered_map<std::string, blink::WebBluetoothDevice*>
+ std::unordered_map<web_bluetooth::WebBluetoothDeviceId,
+ blink::WebBluetoothDevice*,
+ web_bluetooth::WebBluetoothDeviceIdHash>
connected_devices_;
// Binding associated with |web_bluetooth_service_|.

Powered by Google App Engine
This is Rietveld 408576698