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

Side by Side Diff: chrome/installer/mac/app/SystemInfo.m

Issue 2293923005: General comment cleaning / refactoring for Mac Installer (Closed)
Patch Set: Ivan fixes Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include <mach-o/arch.h> 5 #include <mach-o/arch.h>
6 6
7 #import "SystemInfo.h" 7 #import "SystemInfo.h"
8 8
9 @implementation SystemInfo 9 @implementation SystemInfo
10 10
11 + (NSString*)getArch { 11 + (NSString*)getArch {
12 // NOTE: It seems the below function `NSGetLocalArchInfo` returns an
13 // arch->name that is either "x84_64h" or "i486".
12 const NXArchInfo* arch = NXGetLocalArchInfo(); 14 const NXArchInfo* arch = NXGetLocalArchInfo();
13 NSString* archName = [NSString stringWithUTF8String:arch->name]; 15 NSString* archName = [NSString stringWithUTF8String:arch->name];
14 return archName; 16 return archName;
15 } 17 }
16 18
17 + (NSString*)getOSVersion { 19 + (NSString*)getOSVersion {
18 NSDictionary* systemVersion = 20 NSDictionary* systemVersion =
19 [NSDictionary dictionaryWithContentsOfFile: 21 [NSDictionary dictionaryWithContentsOfFile:
20 @"/System/Library/CoreServices/SystemVersion.plist"]; 22 @"/System/Library/CoreServices/SystemVersion.plist"];
21 NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"]; 23 NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"];
22 24
23 return versionNumber; 25 return versionNumber;
24 } 26 }
25 27
26 @end 28 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698