Index: content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
index 5457be97a116c69ecb270aee6d659530225c0bb8..19cad9b7c8ea02382046bf52fcc3db903a22a406 100644 |
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
@@ -408,6 +408,7 @@ void BluetoothDeviceChooserController::GetDevice( |
return; |
} |
+ device_ids_.clear(); |
PopulateConnectedDevices(); |
if (!chooser_.get()) { |
// If the dialog's closing, no need to do any of the rest of this. |
@@ -505,8 +506,6 @@ void BluetoothDeviceChooserController::StartDeviceDiscovery() { |
return; |
} |
- device_ids_.clear(); |
- |
scanning_start_time_ = base::TimeTicks::Now(); |
chooser_->ShowDiscoveryState(BluetoothChooser::DiscoveryState::DISCOVERING); |
@@ -564,6 +563,7 @@ void BluetoothDeviceChooserController::OnBluetoothChooserEvent( |
switch (event) { |
case BluetoothChooser::Event::RESCAN: |
RecordRequestDeviceOutcome(OutcomeFromChooserEvent(event)); |
+ device_ids_.clear(); |
PopulateConnectedDevices(); |
DCHECK(chooser_); |
StartDeviceDiscovery(); |