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

Unified Diff: ios/chrome/common/physical_web/physical_web_device.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_device.mm
diff --git a/ios/chrome/common/physical_web/physical_web_device.mm b/ios/chrome/common/physical_web/physical_web_device.mm
index 918a0607e9d3d01fadb130ea2aee7546c8f99432..420c3e929b2ec87313ae12a0630824f0856edae4 100644
--- a/ios/chrome/common/physical_web/physical_web_device.mm
+++ b/ios/chrome/common/physical_web/physical_web_device.mm
@@ -8,6 +8,10 @@
#include "base/mac/scoped_nsobject.h"
#include "ios/chrome/common/physical_web/physical_web_types.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@implementation PhysicalWebDevice {
base::scoped_nsobject<NSURL> url_;
base::scoped_nsobject<NSURL> requestURL_;
@@ -35,15 +39,15 @@
scanTimestamp:(NSDate*)scanTimestamp {
self = [super init];
if (self) {
- url_.reset([url retain]);
- requestURL_.reset([requestURL retain]);
- icon_.reset([icon retain]);
+ url_.reset(url);
+ requestURL_.reset(requestURL);
+ icon_.reset(icon);
title_.reset([title copy]);
description_.reset([description copy]);
transmitPower_ = transmitPower;
rssi_ = rssi;
rank_ = rank > physical_web::kMaxRank ? physical_web::kMaxRank : rank;
- scanTimestamp_.reset([scanTimestamp retain]);
+ scanTimestamp_.reset(scanTimestamp);
}
return self;
}
@@ -78,7 +82,7 @@
}
- (void)setScanTimestamp:(NSDate*)value {
- scanTimestamp_.reset([value retain]);
+ scanTimestamp_.reset(value);
}
@end
« no previous file with comments | « ios/chrome/common/physical_web/physical_web_device.h ('k') | ios/chrome/common/physical_web/physical_web_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698