Index: device/bluetooth/bluetooth_adapter_win.cc |
diff --git a/device/bluetooth/bluetooth_adapter_win.cc b/device/bluetooth/bluetooth_adapter_win.cc |
index 68f781214c74167c9abad8454cb04e27e57f70e8..b9bf321f5ef3bb17c9377e874bd39b72a3796bcf 100644 |
--- a/device/bluetooth/bluetooth_adapter_win.cc |
+++ b/device/bluetooth/bluetooth_adapter_win.cc |
@@ -43,8 +43,8 @@ BluetoothAdapterWin::BluetoothAdapterWin(const InitCallback& init_callback) |
powered_(false), |
discovery_status_(NOT_DISCOVERING), |
num_discovery_listeners_(0), |
- weak_ptr_factory_(this) { |
-} |
+ force_update_device_for_test_(false), |
+ weak_ptr_factory_(this) {} |
BluetoothAdapterWin::~BluetoothAdapterWin() { |
if (task_manager_.get()) { |
@@ -284,10 +284,11 @@ void BluetoothAdapterWin::DevicesPolled( |
static_cast<BluetoothDeviceWin*>(iter->second); |
if (!device_win->IsEqual(*device_state)) { |
device_win->Update(*device_state); |
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, |
- observers_, |
+ FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
DeviceChanged(this, device_win)); |
} |
+ if (force_update_device_for_test_) |
ortuno
2016/02/19 17:33:05
Could you add a comment explaining why tests need
gogerald1
2016/02/19 22:45:02
Done.
|
+ device_win->Update(*device_state); |
} |
} |
} |