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

Unified Diff: ios/chrome/browser/ui/settings/utils/resized_avatar_cache.mm

Issue 2685863005: [ObjC ARC] Converts ios/chrome/browser/ui/settings/utils:utils to ARC. (Closed)
Patch Set: Created 3 years, 10 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/ui/settings/utils/pref_backed_boolean.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/ui/settings/utils/resized_avatar_cache.mm
diff --git a/ios/chrome/browser/ui/settings/utils/resized_avatar_cache.mm b/ios/chrome/browser/ui/settings/utils/resized_avatar_cache.mm
index 7f3c775e49eb803f2909efd46d9e007c6e806182..b730b6a1be354ea1e1923aca01c96d6ecaebfa8c 100644
--- a/ios/chrome/browser/ui/settings/utils/resized_avatar_cache.mm
+++ b/ios/chrome/browser/ui/settings/utils/resized_avatar_cache.mm
@@ -4,31 +4,34 @@
#import "ios/chrome/browser/ui/settings/utils/resized_avatar_cache.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#import "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#import "ios/public/provider/chrome/browser/signin/chrome_identity.h"
#import "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
#import "ios/public/provider/chrome/browser/signin/signin_resources_provider.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
const CGFloat kAccountProfilePhotoDimension = 40.0f;
} // namespace
@implementation ResizedAvatarCache {
// Retains resized images. Key is Chrome Identity.
- base::scoped_nsobject<NSCache<ChromeIdentity*, UIImage*>> _resizedImages;
+ NSCache<ChromeIdentity*, UIImage*>* _resizedImages;
// Holds weak references to the cached avatar image from the
// ChromeIdentityService. Key is Chrome Identity.
- base::scoped_nsobject<NSMapTable<ChromeIdentity*, UIImage*>> _originalImages;
+ NSMapTable<ChromeIdentity*, UIImage*>* _originalImages;
}
- (instancetype)init {
self = [super init];
if (self) {
- _resizedImages.reset([[NSCache alloc] init]);
- _originalImages.reset([[NSMapTable strongToWeakObjectsMapTable] retain]);
+ _resizedImages = [[NSCache alloc] init];
+ _originalImages = [NSMapTable strongToWeakObjectsMapTable];
}
return self;
}
« no previous file with comments | « ios/chrome/browser/ui/settings/utils/pref_backed_boolean.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698