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

Unified Diff: ios/chrome/common/physical_web/physical_web_scanner.mm

Issue 2507213003: Stop providing Physical Web metadata after Bluetooth is disabled (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/common/physical_web/physical_web_scanner.mm
diff --git a/ios/chrome/common/physical_web/physical_web_scanner.mm b/ios/chrome/common/physical_web/physical_web_scanner.mm
index d35a6689a3aa44caa3fe2e9b864945c8a3628aa6..f07a82ed53c1308f103d01d737cbc0c886330549 100644
--- a/ios/chrome/common/physical_web/physical_web_scanner.mm
+++ b/ios/chrome/common/physical_web/physical_web_scanner.mm
@@ -163,6 +163,9 @@ enum BeaconType {
}
- (NSArray*)devices {
+ if (![self bluetoothEnabled]) {
+ return [NSArray array];
+ }
return [devices_ sortedArrayUsingComparator:^(id obj1, id obj2) {
Olivier 2016/11/17 09:04:36 Should we clear devices_ ?
mattreynolds 2016/11/18 00:03:25 When onLostDetectionEnabled_==NO, I think we shoul
PhysicalWebDevice* device1 = obj1;
PhysicalWebDevice* device2 = obj2;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698