Index: ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm |
diff --git a/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm b/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm |
index dc60affbfe50072ed3b77e8acf6f41f248e350c9..6f9cc2b9a72c3760bf22c8b59666e0a2d0a59e00 100644 |
--- a/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm |
+++ b/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm |
@@ -4,9 +4,7 @@ |
#import "ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.h" |
-#import "base/ios/weak_nsobject.h" |
#include "base/mac/foundation_util.h" |
-#import "base/mac/scoped_nsobject.h" |
#include "base/strings/sys_string_conversions.h" |
#include "components/autofill/core/browser/autofill_profile.h" |
#include "components/autofill/core/browser/field_types.h" |
@@ -24,6 +22,10 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "url/gurl.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
NSString* const kAutofillProfileEditCollectionViewId = |
@"kAutofillProfileEditCollectionViewId"; |
@@ -109,8 +111,7 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { |
+ (instancetype)controllerWithProfile:(const autofill::AutofillProfile&)profile |
personalDataManager: |
(autofill::PersonalDataManager*)dataManager { |
- return [[[self alloc] initWithProfile:profile personalDataManager:dataManager] |
- autorelease]; |
+ return [[self alloc] initWithProfile:profile personalDataManager:dataManager]; |
} |
#pragma mark - SettingsRootCollectionViewController |
@@ -120,8 +121,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { |
if (_autofillProfile.record_type() == |
autofill::AutofillProfile::SERVER_PROFILE) { |
GURL paymentsURL = autofill::payments::GetManageAddressesUrl(0); |
- base::scoped_nsobject<OpenUrlCommand> command( |
- [[OpenUrlCommand alloc] initWithURLFromChrome:paymentsURL]); |
+ OpenUrlCommand* command = |
+ [[OpenUrlCommand alloc] initWithURLFromChrome:paymentsURL]; |
[command setTag:IDC_CLOSE_SETTINGS_AND_OPEN_URL]; |
[self chromeExecuteCommand:command]; |
@@ -181,7 +182,7 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { |
for (size_t i = 0; i < arraysize(kFieldsToDisplay); ++i) { |
const AutofillFieldDisplayInfo& field = kFieldsToDisplay[i]; |
AutofillEditItem* item = |
- [[[AutofillEditItem alloc] initWithType:ItemTypeField] autorelease]; |
+ [[AutofillEditItem alloc] initWithType:ItemTypeField]; |
item.textFieldName = l10n_util::GetNSString(field.displayStringID); |
item.textFieldValue = base::SysUTF16ToNSString(_autofillProfile.GetInfo( |
autofill::AutofillType(field.autofillType), locale)); |