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/ntp/new_tab_page_bar_item.mm

Issue 2889963002: [ObjC ARC] Converts ios/chrome/browser/ui/ntp:ntp_internal to ARC.
Patch Set: Moved testing method accessing ivars to a category 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/ntp/new_tab_page_bar_item.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_bar_item.mm b/ios/chrome/browser/ui/ntp/new_tab_page_bar_item.mm
index 915497f33e479743945e6ee18258c2780cc13507..c871c3418903870e61e9cf4e962138c545711be9 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_bar_item.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_bar_item.mm
@@ -4,29 +4,20 @@
#import "ios/chrome/browser/ui/ntp/new_tab_page_bar_item.h"
-#include "base/mac/objc_property_releaser.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
-@implementation NewTabPageBarItem {
- // Title of the button.
- NSString* title_;
- // A numeric identifier.
- NSUInteger identifier_;
- // Tabbar image.
- UIImage* image_;
- // New tab page view.
- __unsafe_unretained UIView* view_; // weak
- base::mac::ObjCPropertyReleaser propertyReleaser_NewTabPageBarItem_;
-}
-
-@synthesize title = title_;
-@synthesize identifier = identifier_;
-@synthesize image = image_;
-@synthesize view = view_;
+@implementation NewTabPageBarItem
+@synthesize title;
+@synthesize identifier;
+@synthesize image;
+@synthesize view;
+ (NewTabPageBarItem*)newTabPageBarItemWithTitle:(NSString*)title
identifier:(NSUInteger)identifier
image:(UIImage*)image {
- NewTabPageBarItem* item = [[[NewTabPageBarItem alloc] init] autorelease];
+ NewTabPageBarItem* item = [[NewTabPageBarItem alloc] init];
if (item) {
item.title = title;
item.identifier = identifier;
@@ -35,12 +26,4 @@
return item;
}
-- (id)init {
- self = [super init];
- if (self) {
- propertyReleaser_NewTabPageBarItem_.Init(self, [NewTabPageBarItem class]);
- }
- return self;
-}
-
@end
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_bar_item.h ('k') | ios/chrome/browser/ui/ntp/new_tab_page_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698