| Index: base/mac/foundation_util.mm
|
| diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
| index 6ae5df3389977a2268567f062d540d5d11418434..d872fc35d3abf7db40baf700aa1367320f4910fb 100644
|
| --- a/base/mac/foundation_util.mm
|
| +++ b/base/mac/foundation_util.mm
|
| @@ -18,6 +18,10 @@
|
| #include "build/build_config.h"
|
|
|
| #if !defined(OS_IOS)
|
| +#import <AppKit/AppKit.h>
|
| +#endif
|
| +
|
| +#if !defined(OS_IOS)
|
| extern "C" {
|
| CFTypeID SecACLGetTypeID();
|
| CFTypeID SecTrustedApplicationGetTypeID();
|
| @@ -316,7 +320,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
|
| DCHECK(!cf_val ||
|
| CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
| (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
|
| - [ns_val isKindOfClass:NSClassFromString(@"NSFont")]));
|
| + [ns_val isKindOfClass:[NSFont class]]));
|
| return ns_val;
|
| }
|
|
|
| @@ -324,7 +328,7 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
| CTFontRef cf_val = reinterpret_cast<CTFontRef>(ns_val);
|
| DCHECK(!cf_val ||
|
| CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
| - [ns_val isKindOfClass:NSClassFromString(@"NSFont")]);
|
| + [ns_val isKindOfClass:[NSFont class]]);
|
| return cf_val;
|
| }
|
| #endif
|
| @@ -388,7 +392,7 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
|
| return NULL;
|
|
|
| id<NSObject> ns_val = reinterpret_cast<id>(const_cast<void*>(cf_val));
|
| - if ([ns_val isKindOfClass:NSClassFromString(@"NSFont")]) {
|
| + if ([ns_val isKindOfClass:[NSFont class]]) {
|
| return (CTFontRef)(cf_val);
|
| }
|
| return NULL;
|
|
|