Index: chrome/installer/mac/app/systemInfo.m |
diff --git a/chrome/installer/mac/app/systemInfo.m b/chrome/installer/mac/app/systemInfo.m |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e3568d439d6cfda808acc1ef65f94a7fcc87ea82 |
--- /dev/null |
+++ b/chrome/installer/mac/app/systemInfo.m |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#import "SystemInfo.h" |
Mark Mentovai
2016/07/11 17:56:17
Blank after me too.
|
+#include <mach-o/arch.h> |
+ |
+@implementation SystemInfo |
+ |
++ (NSString*)getArch { |
+ const NXArchInfo* arch = NXGetLocalArchInfo(); |
+ NSString* archName = [NSString stringWithUTF8String:arch->name]; |
+ return archName; |
+} |
+ |
++ (NSString*)getOSVersion { |
+ // NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] |
Elly Fong-Jones
2016/07/11 16:15:48
This commented-out code doesn't need to be here.
|
+ // operatingSystemVersion]; |
+ // NSString* versionNumber = [NSString stringWithFormat:@"%ld.%ld.%ld", |
+ // osVersion.majorVersion, |
+ // osVersion.minorVersion, |
+ // osVersion.patchVersion]; |
+ NSDictionary* systemVersion = |
+ [NSDictionary dictionaryWithContentsOfFile: |
+ @"/System/Library/CoreServices/SystemVersion.plist"]; |
+ NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"]; |
+ |
+ return versionNumber; |
+} |
+ |
+@end |