Chromium Code Reviews| Index: device/bluetooth/bluez/bluetooth_adapter_bluez.cc |
| diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc |
| index 83ade15bece80628400d34a67ba839219c137f22..0298d248be368ce51ff6af65f1c3d8b97df51c3e 100644 |
| --- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc |
| +++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc |
| @@ -1455,17 +1455,12 @@ void BluetoothAdapterBlueZ::SetDiscoveryFilter( |
| return; |
| } |
| - // If old and new filter are equal (null) then don't make request, just call |
| - // succes callback |
| - if (!current_filter_ && !discovery_filter.get()) { |
| - callback.Run(); |
| - return; |
| - } |
| - |
| - // If old and new filter are not null and equal then don't make request, just |
| - // call succes callback |
| - if (current_filter_ && discovery_filter && |
| - current_filter_->Equals(*discovery_filter)) { |
| + // If the old and new filter are both null and equal then don't make the |
|
dschuyler
2017/05/04 22:43:52
s/ and equal//
Lei Zhang
2017/05/17 21:14:39
Done.
|
| + // request, and just call the success callback. |
| + // Do the same if the old and new filter are both not null and equal. |
| + if ((!current_filter_ && !discovery_filter.get()) || |
| + (current_filter_ && discovery_filter && |
| + current_filter_->Equals(*discovery_filter))) { |
| callback.Run(); |
| return; |
| } |