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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.h

Issue 2321693002: arc/bluetooth: Save BluetoothGattConnection objects (Closed)
Patch Set: Created 4 years, 3 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: 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_;
« no previous file with comments | « no previous file | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698