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

Unified Diff: ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.mm

Issue 2820323002: [ObjC ARC] Converts ios/chrome/browser/ui/colors:colors to ARC. (Closed)
Patch Set: Created 3 years, 8 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/colors/BUILD.gn ('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/colors/MDCPalette+CrAdditions.mm
diff --git a/ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.mm b/ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.mm
index 2e2708e49800b482fcb32f5de048ca3732d86412..22d6691990f53a120a762655b7fae0554492793c 100644
--- a/ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.mm
+++ b/ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.mm
@@ -6,6 +6,10 @@
#include "ios/web/public/web_thread.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@implementation MDCPalette (CrAdditions)
namespace {
@@ -50,29 +54,25 @@ static MDCPalette* g_yellowPalette = nil;
+ (void)cr_setBluePalette:(MDCPalette*)palette {
DCHECK(!web::WebThread::IsThreadInitialized(web::WebThread::UI) ||
web::WebThread::CurrentlyOn(web::WebThread::UI));
- [g_bluePalette autorelease];
- g_bluePalette = [palette retain];
+ g_bluePalette = palette;
}
+ (void)cr_setRedPalette:(MDCPalette*)palette {
DCHECK(!web::WebThread::IsThreadInitialized(web::WebThread::UI) ||
web::WebThread::CurrentlyOn(web::WebThread::UI));
- [g_redPalette autorelease];
- g_redPalette = [palette retain];
+ g_redPalette = palette;
}
+ (void)cr_setGreenPalette:(MDCPalette*)palette {
DCHECK(!web::WebThread::IsThreadInitialized(web::WebThread::UI) ||
web::WebThread::CurrentlyOn(web::WebThread::UI));
- [g_greenPalette autorelease];
- g_greenPalette = [palette retain];
+ g_greenPalette = palette;
}
+ (void)cr_setYellowPalette:(MDCPalette*)palette {
DCHECK(!web::WebThread::IsThreadInitialized(web::WebThread::UI) ||
web::WebThread::CurrentlyOn(web::WebThread::UI));
- [g_yellowPalette autorelease];
- g_yellowPalette = [palette retain];
+ g_yellowPalette = palette;
}
@end
« no previous file with comments | « ios/chrome/browser/ui/colors/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698