| 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 d94de1a4e3949f287ad20ce7dfefcf1999d8c8e0..d3d00841c4b9f4b6d603744409b464760882cd97 100644
|
| --- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
|
| +++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
|
| @@ -321,7 +321,7 @@ void BluetoothDeviceChooserController::GetDevice(
|
| return;
|
| }
|
|
|
| - PopulateFoundDevices();
|
| + PopulateConnectedDevices();
|
| if (!chooser_.get()) {
|
| // If the dialog's closing, no need to do any of the rest of this.
|
| return;
|
| @@ -339,7 +339,6 @@ void BluetoothDeviceChooserController::GetDevice(
|
| void BluetoothDeviceChooserController::AddFilteredDevice(
|
| const device::BluetoothDevice& device) {
|
| if (chooser_.get() && MatchesFilters(device, options_->filters)) {
|
| - VLOG(1) << "Adding device to chooser: " << device.GetAddress();
|
| chooser_->AddOrUpdateDevice(device.GetAddress(),
|
| device.GetNameForDisplay());
|
| }
|
| @@ -369,11 +368,11 @@ void BluetoothDeviceChooserController::SetTestScanDurationForTesting() {
|
| BluetoothDeviceChooserController::use_test_scan_duration_ = true;
|
| }
|
|
|
| -void BluetoothDeviceChooserController::PopulateFoundDevices() {
|
| - VLOG(1) << "Populating " << adapter_->GetDevices().size()
|
| - << " devices in chooser.";
|
| +void BluetoothDeviceChooserController::PopulateConnectedDevices() {
|
| for (const device::BluetoothDevice* device : adapter_->GetDevices()) {
|
| - AddFilteredDevice(*device);
|
| + if (device->IsGattConnected()) {
|
| + AddFilteredDevice(*device);
|
| + }
|
| }
|
| }
|
|
|
| @@ -433,7 +432,7 @@ void BluetoothDeviceChooserController::OnBluetoothChooserEvent(
|
|
|
| switch (event) {
|
| case BluetoothChooser::Event::RESCAN:
|
| - PopulateFoundDevices();
|
| + PopulateConnectedDevices();
|
| DCHECK(chooser_);
|
| StartDeviceDiscovery();
|
| // No need to close the chooser so we return.
|
|
|