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

Unified Diff: device/bluetooth/bluetooth_device.cc

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_device.h ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index e666aa5c870785788f24031163407101a6ef8146..05532cc2b071b831cbc744c2d107cf6c07da519f 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -19,7 +19,9 @@
namespace device {
BluetoothDevice::BluetoothDevice(BluetoothAdapter* adapter)
- : adapter_(adapter), services_data_(new base::DictionaryValue()) {}
+ : adapter_(adapter),
+ gatt_services_discovery_complete_(false),
+ services_data_(new base::DictionaryValue()) {}
BluetoothDevice::~BluetoothDevice() {
DidDisconnectGatt();
@@ -214,6 +216,14 @@ void BluetoothDevice::CreateGattConnection(
CreateGattConnectionImpl();
}
+void BluetoothDevice::SetGattServicesDiscoveryComplete(bool complete) {
+ gatt_services_discovery_complete_ = complete;
+}
+
+bool BluetoothDevice::IsGattServicesDiscoveryComplete() const {
+ return gatt_services_discovery_complete_;
+}
+
std::vector<BluetoothGattService*>
BluetoothDevice::GetGattServices() const {
std::vector<BluetoothGattService*> services;
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698