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

Unified Diff: ios/chrome/browser/passwords/update_password_infobar_controller.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
« no previous file with comments | « ios/chrome/browser/passwords/password_generation_offer_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/passwords/update_password_infobar_controller.mm
diff --git a/ios/chrome/browser/passwords/update_password_infobar_controller.mm b/ios/chrome/browser/passwords/update_password_infobar_controller.mm
index ed3e4510bd4c9f9d0f8cb60379b06952f99c4d43..50a68d8cea70f1f0c11b51d0f4ca44b6697556a3 100644
--- a/ios/chrome/browser/passwords/update_password_infobar_controller.mm
+++ b/ios/chrome/browser/passwords/update_password_infobar_controller.mm
@@ -4,8 +4,6 @@
#import "ios/chrome/browser/passwords/update_password_infobar_controller.h"
-#include "base/ios/weak_nsobject.h"
-#import "base/mac/objc_property_releaser.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/infobars/confirm_infobar_controller+protected.h"
@@ -13,6 +11,10 @@
#import "ios/chrome/browser/ui/elements/selector_coordinator.h"
#import "ios/chrome/browser/ui/infobars/infobar_view.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Tag for the account link in the info bar message. Set to 10 to avoid conflict
// with tags from superclass ConfirmInfoBarController, which uses tags 1-4.
@@ -20,26 +22,15 @@ NSUInteger kAccountTag = 10;
}
@interface UpdatePasswordInfoBarController ()<SelectorCoordinatorDelegate> {
- base::mac::ObjCPropertyReleaser
- _propertyReleaser_UpdatePasswordInfoBarController;
IOSChromeUpdatePasswordInfoBarDelegate* _delegate;
}
-@property(nonatomic, retain) SelectorCoordinator* selectorCoordinator;
+@property(nonatomic, strong) SelectorCoordinator* selectorCoordinator;
@end
@implementation UpdatePasswordInfoBarController
@synthesize selectorCoordinator = _selectorCoordinator;
-- (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate {
- self = [super initWithDelegate:delegate];
- if (self) {
- _propertyReleaser_UpdatePasswordInfoBarController.Init(
- self, [UpdatePasswordInfoBarController class]);
- }
- return self;
-}
-
- (InfoBarView*)viewForDelegate:
(IOSChromeUpdatePasswordInfoBarDelegate*)delegate
frame:(CGRect)frame {
@@ -62,7 +53,7 @@ NSUInteger kAccountTag = 10;
&messageText, 0, _delegate->selected_account(), usernameLink);
}
- base::WeakNSObject<UpdatePasswordInfoBarController> weakSelf(self);
+ __weak UpdatePasswordInfoBarController* weakSelf = self;
[view addLabel:base::SysUTF16ToNSString(messageText)
action:^(NSUInteger tag) {
[weakSelf infobarLinkDidPress:tag];
@@ -76,8 +67,8 @@ NSUInteger kAccountTag = 10;
UIViewController* baseViewController =
[[UIApplication sharedApplication] keyWindow].rootViewController;
- self.selectorCoordinator = [[[SelectorCoordinator alloc]
- initWithBaseViewController:baseViewController] autorelease];
+ self.selectorCoordinator = [[SelectorCoordinator alloc]
+ initWithBaseViewController:baseViewController];
self.selectorCoordinator.delegate = self;
self.selectorCoordinator.options =
[NSOrderedSet orderedSetWithArray:_delegate->GetAccounts()];
« no previous file with comments | « ios/chrome/browser/passwords/password_generation_offer_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698