Chromium Code Reviews| Index: components/arc/bluetooth/arc_bluetooth_bridge.h |
| diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.h b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| index fd98791b1995e9c1c65c4eb937b3297d873d626f..05bef9501541145f049f79e4fabf6fe3308d74c5 100644 |
| --- a/components/arc/bluetooth/arc_bluetooth_bridge.h |
| +++ b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| @@ -291,11 +291,11 @@ class ArcBluetoothBridge |
| bool connected) const; |
| void OnGattConnected( |
| mojom::BluetoothAddressPtr addr, |
| - std::unique_ptr<device::BluetoothGattConnection> connection) const; |
| + std::unique_ptr<device::BluetoothGattConnection> connection); |
| void OnGattConnectError( |
| mojom::BluetoothAddressPtr addr, |
| device::BluetoothDevice::ConnectErrorCode error_code) const; |
| - void OnGattDisconnected(mojom::BluetoothAddressPtr addr) const; |
| + void OnGattDisconnected(mojom::BluetoothAddressPtr addr); |
| void OnStartLEListenDone(const StartLEListenCallback& callback, |
| scoped_refptr<device::BluetoothAdvertisement> adv); |
| @@ -385,6 +385,11 @@ class ArcBluetoothBridge |
| int32_t gatt_server_attribute_next_handle_ = 0; |
| // Keeps track of all devices which initiated a GATT connection to us. |
| std::unordered_set<std::string> gatt_connection_cache_; |
| + // Map of device address to GATT connection objects for connections we |
| + // have made. |
| + std::unordered_map<std::string, |
| + std::unique_ptr<device::BluetoothGattConnection>> |
| + gatt_connections_; |
|
Luis Héctor Chávez
2016/09/07 19:54:15
nit: Add a comment that we are holding these just
|
| // Timer to turn adapter discoverable off. |
| base::OneShotTimer discoverable_off_timer_; |