Index: content/browser/bluetooth/web_bluetooth_service_impl.cc |
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
index 974eb1db941a03eadbc6b82a7ff941677824002d..d559d92dfcf0d1153818804504edc618ab392873 100644 |
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc |
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
@@ -228,8 +228,6 @@ void WebBluetoothServiceImpl::DeviceAdded(device::BluetoothAdapter* adapter, |
device::BluetoothDevice* device) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
if (device_chooser_controller_.get()) { |
- VLOG(1) << "Adding device to device chooser controller: " |
- << device->GetAddress(); |
device_chooser_controller_->AddFilteredDevice(*device); |
} |
} |
@@ -237,6 +235,11 @@ void WebBluetoothServiceImpl::DeviceAdded(device::BluetoothAdapter* adapter, |
void WebBluetoothServiceImpl::DeviceChanged(device::BluetoothAdapter* adapter, |
device::BluetoothDevice* device) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ |
+ if (device_chooser_controller_.get()) { |
+ device_chooser_controller_->AddFilteredDevice(*device); |
+ } |
+ |
if (!device->IsGattConnected()) { |
base::Optional<WebBluetoothDeviceId> device_id = |
connected_devices_->CloseConnectionToDeviceWithAddress( |
@@ -250,6 +253,10 @@ void WebBluetoothServiceImpl::DeviceChanged(device::BluetoothAdapter* adapter, |
void WebBluetoothServiceImpl::GattServicesDiscovered( |
device::BluetoothAdapter* adapter, |
device::BluetoothDevice* device) { |
+ if (device_chooser_controller_.get()) { |
+ device_chooser_controller_->AddFilteredDevice(*device); |
+ } |
+ |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
const std::string& device_address = device->GetAddress(); |
VLOG(1) << "Services discovered for device: " << device_address; |