Index: content/browser/bluetooth/frame_connected_bluetooth_devices.h |
diff --git a/content/browser/bluetooth/frame_connected_bluetooth_devices.h b/content/browser/bluetooth/frame_connected_bluetooth_devices.h |
index 4168059d2f92b9a008f3fc0877e815d20a3b9c72..bf76e55763527d7cfcfbeaf7f0c6957cbf80c2e6 100644 |
--- a/content/browser/bluetooth/frame_connected_bluetooth_devices.h |
+++ b/content/browser/bluetooth/frame_connected_bluetooth_devices.h |
@@ -9,8 +9,6 @@ |
#include <string> |
#include <unordered_map> |
-#include "base/optional.h" |
-#include "content/common/bluetooth/web_bluetooth_device_id.h" |
#include "content/common/content_export.h" |
#include "url/origin.h" |
@@ -37,22 +35,22 @@ |
~FrameConnectedBluetoothDevices(); |
// Returns true if the map holds a connection to |device_id|. |
- bool IsConnectedToDeviceWithId(const WebBluetoothDeviceId& device_id); |
+ bool IsConnectedToDeviceWithId(const std::string& device_id); |
// If a connection doesn't exist already for |device_id|, adds a connection to |
// the map and increases the WebContents count of connected devices. |
- void Insert(const WebBluetoothDeviceId& device_id, |
+ void Insert(const std::string& device_id, |
std::unique_ptr<device::BluetoothGattConnection> connection); |
// Deletes the BluetoothGattConnection for |device_id| and decrements the |
// WebContents count of connected devices if |device_id| had a connection. |
- void CloseConnectionToDeviceWithId(const WebBluetoothDeviceId& device_id); |
+ void CloseConnectionToDeviceWithId(const std::string& device_id); |
// Deletes the BluetoothGattConnection for |device_address| and decrements the |
// WebContents count of connected devices if |device_address| had a |
// connection. Returns the device_id of the device associated with the |
// connection. |
- base::Optional<WebBluetoothDeviceId> CloseConnectionToDeviceWithAddress( |
+ std::string CloseConnectionToDeviceWithAddress( |
const std::string& device_address); |
private: |
@@ -66,14 +64,12 @@ |
// Keeps the BluetoothGattConnection objects alive so that connections don't |
// get closed. |
- std::unordered_map<WebBluetoothDeviceId, |
- std::unique_ptr<device::BluetoothGattConnection>, |
- WebBluetoothDeviceIdHash> |
+ std::unordered_map<std::string, |
+ std::unique_ptr<device::BluetoothGattConnection>> |
device_id_to_connection_map_; |
// Keeps track of which device addresses correspond to which ids. |
- std::unordered_map<std::string, WebBluetoothDeviceId> |
- device_address_to_id_map_; |
+ std::unordered_map<std::string, std::string> device_address_to_id_map_; |
DISALLOW_COPY_AND_ASSIGN(FrameConnectedBluetoothDevices); |
}; |