Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit e5f645c

Browse files
committed
document yosemite API usage
1 parent a99ea81 commit e5f645c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

appshell/cefclient_mac.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ -(void)windowTitleDidChange:(NSString*)title {
222222
}
223223

224224
-(BOOL)isRunningOnYosemite {
225-
NSDictionary * dict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
226-
NSString *version = [dict objectForKey:@"ProductVersion"];
227-
return ([version hasPrefix:@"10.10"]);
225+
// this API returns nil prior to Yosemite
226+
NSDictionary * dict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
227+
return dict != nil;
228228
}
229229

230230
- (BOOL)isFullScreenSupported {

appshell/client_handler_mac.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,12 @@ - (void)setIsReallyClosing {
165165
isReallyClosing = true;
166166
}
167167

168-
//
169168
-(BOOL)isRunningOnYosemite {
169+
// this API returns nil prior to Yosemite
170170
NSDictionary * dict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
171-
NSString *version = [dict objectForKey:@"ProductVersion"];
172-
return ([version hasPrefix:@"10.10"]);
171+
return dict != nil;
173172
}
174173

175-
176174
- (BOOL)isFullScreenSupported {
177175
// Return False on Yosemite so we
178176
// don't draw our own full screen button

0 commit comments

Comments
 (0)