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

Unified Diff: ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm

Issue 2814813003: [ObjC ARC] Converts ios/chrome/browser/ui/settings:settings_arc_transition to ARC. (Closed)
Patch Set: rebase Created 3 years, 8 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
Index: ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm b/ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm
index 8fcca0939ced9304ffa912899d0fd20619c707d7..57d5425706bcd1fb01988060f311d4a1311048d8 100644
--- a/ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/handoff_collection_view_controller.mm
@@ -15,6 +15,10 @@
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
typedef NS_ENUM(NSInteger, SectionIdentifier) {
@@ -61,8 +65,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
CollectionViewModel* model = self.collectionViewModel;
[model addSectionWithIdentifier:SectionIdentifierSwitch];
- CollectionViewSwitchItem* switchItem = [[[CollectionViewSwitchItem alloc]
- initWithType:ItemTypeSwitch] autorelease];
+ CollectionViewSwitchItem* switchItem =
+ [[CollectionViewSwitchItem alloc] initWithType:ItemTypeSwitch];
switchItem.text =
l10n_util::GetNSString(IDS_IOS_OPTIONS_ENABLE_HANDOFF_TO_OTHER_DEVICES);
switchItem.on = _handoffEnabled.GetValue();
@@ -72,8 +76,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
// drawing bug in MDC.
// TODO(crbug.com/650424) Use setFooter:forSectionWithIdentifier:.
[model addSectionWithIdentifier:SectionIdentifierFooter];
- CollectionViewFooterItem* footer = [[[CollectionViewFooterItem alloc]
- initWithType:ItemTypeFooter] autorelease];
+ CollectionViewFooterItem* footer =
+ [[CollectionViewFooterItem alloc] initWithType:ItemTypeFooter];
footer.text = l10n_util::GetNSString(
IDS_IOS_OPTIONS_ENABLE_HANDOFF_TO_OTHER_DEVICES_DETAILS);
[model addItem:footer toSectionWithIdentifier:SectionIdentifierFooter];

Powered by Google App Engine
This is Rietveld 408576698