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

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

Issue 2813223002: [ObjC ARC] Converts ios/chrome/browser/ui/settings:settings to ARC. (Closed)
Patch Set: reabse 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
Index: ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm b/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm
index 9930c152ca4001a4499807b94eec512e2047c652..f1e0498ae5f6e2b5cfaa16431d223477a7d6025a 100644
--- a/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm
@@ -4,8 +4,6 @@
#import "ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.h"
-#import "base/ios/weak_nsobject.h"
-#import "base/mac/scoped_nsobject.h"
#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "components/browser_sync/profile_sync_service.h"
@@ -29,6 +27,10 @@
#include "ui/base/l10n/l10n_util_mac.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
typedef NS_ENUM(NSInteger, SectionIdentifier) {
@@ -117,8 +119,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
}
- (CollectionViewItem*)footerItem {
- CollectionViewFooterItem* footerItem = [[[CollectionViewFooterItem alloc]
- initWithType:ItemTypeFooter] autorelease];
+ CollectionViewFooterItem* footerItem =
+ [[CollectionViewFooterItem alloc] initWithType:ItemTypeFooter];
footerItem.text =
l10n_util::GetNSString(IDS_IOS_SYNC_ENCRYPTION_PASSPHRASE_HINT);
footerItem.linkURL = google_util::AppendGoogleLocaleParam(
@@ -191,9 +193,9 @@ typedef NS_ENUM(NSInteger, ItemType) {
IOSChromeProfileSyncServiceFactory::GetForBrowserState(_browserState);
if (service->IsEngineInitialized() &&
!service->IsUsingSecondaryPassphrase()) {
- base::scoped_nsobject<SyncCreatePassphraseCollectionViewController>
- controller([[SyncCreatePassphraseCollectionViewController alloc]
- initWithBrowserState:_browserState]);
+ SyncCreatePassphraseCollectionViewController* controller =
+ [[SyncCreatePassphraseCollectionViewController alloc]
+ initWithBrowserState:_browserState];
[self.navigationController pushViewController:controller animated:YES];
}
break;
@@ -224,8 +226,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
text:(NSString*)text
checked:(BOOL)checked
enabled:(BOOL)enabled {
- EncryptionItem* item =
- [[[EncryptionItem alloc] initWithType:type] autorelease];
+ EncryptionItem* item = [[EncryptionItem alloc] initWithType:type];
item.text = text;
item.accessoryType = checked ? MDCCollectionViewCellAccessoryCheckmark
: MDCCollectionViewCellAccessoryNone;

Powered by Google App Engine
This is Rietveld 408576698