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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 1592733002: Clear the BLE services list on disconnect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the bluetooth/getPrimaryService.html timeout issue 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.cc ('k') | device/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 845c89a15febd1ca4f6d6cdc3d44172b58af8fed..17c5fdab72bba51cbccb6a34b64b7332f2551d67 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -432,6 +432,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
virtual void CreateGattConnection(const GattConnectionCallback& callback,
const ConnectErrorCallback& error_callback);
+ // Set the gatt services discovery complete flag for this device.
+ void SetGattServicesDiscoveryComplete(bool complete);
+
+ // Indicates whether service discovery is complete for this device.
+ bool IsGattServicesDiscoveryComplete() const;
+
// Returns the list of discovered GATT services.
virtual std::vector<BluetoothGattService*> GetGattServices() const;
@@ -462,6 +468,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
BluetoothGattConnection_DisconnectGatt_SimulateDisconnect);
FRIEND_TEST_ALL_PREFIXES(BluetoothTest,
BluetoothGattConnection_ErrorAfterConnection);
+ FRIEND_TEST_ALL_PREFIXES(BluetoothTest,
+ BluetoothGattConnection_DisconnectGatt_Cleanup);
BluetoothDevice(BluetoothAdapter* adapter);
@@ -519,6 +527,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
typedef base::ScopedPtrHashMap<std::string, scoped_ptr<BluetoothGattService>>
GattServiceMap;
GattServiceMap gatt_services_;
+ bool gatt_services_discovery_complete_;
// Mapping from service UUID represented as a std::string of a bluetooth
// service to
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.cc ('k') | device/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698