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

Side by Side Diff: ios/chrome/browser/ui/ntp/new_tab_page_bar_item.mm

Issue 2610923005: Replace ObjCPropertyReleaser with ReleaseProperties() project-wide. (Closed)
Patch Set: weak -> assign Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/ntp/new_tab_page_bar_item.h" 5 #import "ios/chrome/browser/ui/ntp/new_tab_page_bar_item.h"
6 6
7 #include "base/mac/objc_property_releaser.h" 7 #include "base/mac/objc_release_properties.h"
8 8
9 @implementation NewTabPageBarItem { 9 @implementation NewTabPageBarItem
10 // Title of the button.
11 NSString* title_;
12 // A numeric identifier.
13 NSUInteger identifier_;
14 // Tabbar image.
15 UIImage* image_;
16 // New tab page view.
17 __unsafe_unretained UIView* view_; // weak
18 base::mac::ObjCPropertyReleaser propertyReleaser_NewTabPageBarItem_;
19 }
20 10
21 @synthesize title = title_; 11 @synthesize title = title_;
22 @synthesize identifier = identifier_; 12 @synthesize identifier = identifier_;
23 @synthesize image = image_; 13 @synthesize image = image_;
24 @synthesize view = view_; 14 @synthesize view = view_;
25 15
26 + (NewTabPageBarItem*)newTabPageBarItemWithTitle:(NSString*)title 16 + (NewTabPageBarItem*)newTabPageBarItemWithTitle:(NSString*)title
27 identifier:(NSUInteger)identifier 17 identifier:(NSUInteger)identifier
28 image:(UIImage*)image { 18 image:(UIImage*)image {
29 NewTabPageBarItem* item = [[[NewTabPageBarItem alloc] init] autorelease]; 19 NewTabPageBarItem* item = [[[NewTabPageBarItem alloc] init] autorelease];
30 if (item) { 20 if (item) {
31 item.title = title; 21 item.title = title;
32 item.identifier = identifier; 22 item.identifier = identifier;
33 item.image = image; 23 item.image = image;
34 } 24 }
35 return item; 25 return item;
36 } 26 }
37 27
38 - (id)init { 28 - (void)dealloc {
39 self = [super init]; 29 base::mac::ReleaseProperties(self);
40 if (self) { 30 [super dealloc];
41 propertyReleaser_NewTabPageBarItem_.Init(self, [NewTabPageBarItem class]);
42 }
43 return self;
44 } 31 }
45 32
46 @end 33 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698