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

Unified Diff: chrome/installer/mac/app/SystemInfo.m

Issue 2094583004: Initial commit for Chrome metainstaller on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made small changes according to LGTM comments Created 4 years, 5 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 | « chrome/installer/mac/app/SystemInfo.h ('k') | chrome/installer/mac/app/main.m » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..66e3cf81962c12967dc75298ea677ccf59038368
--- /dev/null
+++ b/chrome/installer/mac/app/SystemInfo.m
@@ -0,0 +1,26 @@
+// 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.
+
+#include <mach-o/arch.h>
+
+#import "SystemInfo.h"
+
+@implementation SystemInfo
+
++ (NSString*)getArch {
+ const NXArchInfo* arch = NXGetLocalArchInfo();
+ NSString* archName = [NSString stringWithUTF8String:arch->name];
+ return archName;
+}
+
++ (NSString*)getOSVersion {
+ NSDictionary* systemVersion =
+ [NSDictionary dictionaryWithContentsOfFile:
+ @"/System/Library/CoreServices/SystemVersion.plist"];
+ NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"];
+
+ return versionNumber;
+}
+
+@end
« no previous file with comments | « chrome/installer/mac/app/SystemInfo.h ('k') | chrome/installer/mac/app/main.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698