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

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

Issue 2512613005: [ObjC ARC] Converts ios/chrome/common/physical_web:physical_web to ARC.Automatically generated AR… (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
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 3dc636af5e48defe63c6a627d52559c7f9107d9b..572ebf46f27701639bc32019d875a66427227579 100644
--- a/ios/chrome/common/physical_web/physical_web_scanner.mm
+++ b/ios/chrome/common/physical_web/physical_web_scanner.mm
@@ -21,6 +21,10 @@
#import "ios/chrome/common/physical_web/physical_web_request.h"
#import "ios/chrome/common/physical_web/physical_web_types.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
NSString* const kUriBeaconServiceUUID = @"FED8";
@@ -131,7 +135,6 @@ enum BeaconType {
[updateTimer_ invalidate];
updateTimer_.reset();
}
- [super dealloc];
}
- (void)start {
@@ -252,12 +255,12 @@ enum BeaconType {
];
if (onLostDetectionEnabled_) {
// Register a repeating timer to periodically check for lost URLs.
- updateTimer_.reset(
- [[NSTimer scheduledTimerWithTimeInterval:kUpdateIntervalSeconds
- target:self
- selector:@selector(onUpdateTimeElapsed:)
- userInfo:nil
- repeats:YES] retain]);
+ updateTimer_.reset([NSTimer
+ scheduledTimerWithTimeInterval:kUpdateIntervalSeconds
+ target:self
+ selector:@selector(onUpdateTimeElapsed:)
+ userInfo:nil
+ repeats:YES]);
}
[centralManager_ scanForPeripheralsWithServices:serviceUUIDs options:nil];
}
@@ -472,7 +475,7 @@ enum BeaconType {
[pendingRequests_ addObject:strongRequest];
base::WeakNSObject<PhysicalWebScanner> weakSelf(self);
[request start:^(PhysicalWebDevice* device, NSError* error) {
- base::scoped_nsobject<PhysicalWebScanner> strongSelf([weakSelf retain]);
+ base::scoped_nsobject<PhysicalWebScanner> strongSelf(weakSelf);
if (!strongSelf) {
return;
}
« no previous file with comments | « ios/chrome/common/physical_web/physical_web_request.mm ('k') | ios/chrome/common/physical_web/physical_web_types.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698