Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.cc

Issue 2860963002: Spell success correctly. (Closed)
Patch Set: rebase, nits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus/message.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eb330ee637f3812f7ec475d8fd28596caaf88853 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 then don't make the 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;
}
« no previous file with comments | « dbus/message.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698