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

Unified Diff: ios/chrome/browser/passwords/password_generation_edit_view.mm

Issue 2933873002: [ObjC ARC] Converts ios/chrome/browser/passwords:passwords to ARC. (Closed)
Patch Set: fix names and nil assignments. Created 3 years, 6 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/passwords/password_generation_edit_view.mm
diff --git a/ios/chrome/browser/passwords/password_generation_edit_view.mm b/ios/chrome/browser/passwords/password_generation_edit_view.mm
index 9632ea7dfe001cb4a0e78be829493355f36e79ae..26e7d13d757df9802d82eb146d9b0a0f8c8d86be 100644
--- a/ios/chrome/browser/passwords/password_generation_edit_view.mm
+++ b/ios/chrome/browser/passwords/password_generation_edit_view.mm
@@ -6,16 +6,19 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
#include "ios/chrome/browser/passwords/password_generation_utils.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Constants for the edit view.
const CGFloat kEditViewFontSize = 15;
} // namespace
@implementation PasswordGenerationEditView {
- base::scoped_nsobject<UITextField> _textField;
+ UITextField* _textField;
}
- (instancetype)initWithPassword:(NSString*)password {
@@ -23,7 +26,7 @@ const CGFloat kEditViewFontSize = 15;
const CGRect defaultFrameSize = CGRectMake(0, 0, 100, 30);
self = [super initWithFrame:defaultFrameSize];
if (self) {
- _textField.reset([[UITextField alloc] init]);
+ _textField = [[UITextField alloc] init];
[_textField setText:password];
[_textField setFont:[UIFont systemFontOfSize:kEditViewFontSize]];
[_textField setBackgroundColor:[UIColor clearColor]];

Powered by Google App Engine
This is Rietveld 408576698