Index: content/browser/bluetooth/bluetooth_dispatcher_host.cc |
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
index 56a1d4f3f1cf73eb7c6213a0a3419eeee76e3ca5..bd86335c519f36410705b50393c18e1458231acc 100644 |
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
@@ -298,7 +298,6 @@ void BluetoothDispatcherHost::SetBluetoothAdapterForTesting( |
characteristic_id_to_notify_session_.clear(); |
active_characteristic_threads_.clear(); |
connections_.clear(); |
- devices_with_discovered_services_.clear(); |
} |
set_adapter(std::move(mock_adapter)); |
@@ -500,8 +499,6 @@ void BluetoothDispatcherHost::GattServicesDiscovered( |
const std::string& device_id = device->GetAddress(); |
VLOG(1) << "Services discovered for device: " << device_id; |
- devices_with_discovered_services_.insert(device_id); |
- |
auto iter = pending_primary_services_requests_.find(device_id); |
if (iter == pending_primary_services_requests_.end()) { |
return; |
@@ -764,7 +761,7 @@ void BluetoothDispatcherHost::OnGetPrimaryService( |
} |
// 3. |
- if (IsServicesDiscoveryCompleteForDevice(device_id)) { |
+ if (query_result.device->IsGattServicesDiscoveryComplete()) { |
VLOG(1) << "Service not found in device."; |
RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome::NOT_FOUND); |
Send(new BluetoothMsg_GetPrimaryServiceError( |
@@ -1321,11 +1318,6 @@ BluetoothDispatcherHost::QueryCacheForCharacteristic( |
return result; |
} |
-bool BluetoothDispatcherHost::IsServicesDiscoveryCompleteForDevice( |
- const std::string& device_id) { |
- return ContainsKey(devices_with_discovered_services_, device_id); |
-} |
- |
void BluetoothDispatcherHost::AddToPendingPrimaryServicesRequest( |
const std::string& device_id, |
const PrimaryServicesRequest& request) { |