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

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: Fixed majority of comments excluding refactoring for blocks in main. 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
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..08b07c4f1f1d215a024a46e2646fccc81db0583a
--- /dev/null
+++ b/chrome/installer/mac/app/systemInfo.m
@@ -0,0 +1,32 @@
+// 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"
+#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]
+ // operatingSystemVersion];
+ // NSString* versionNumber = [NSString stringWithFormat:@"%ld.%ld.%ld",
+ // osVersion.majorVersion,
+ // osVersion.minorVersion,
+ // osVersion.patchVersion];
+ NSString *versionNumber;
+ NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:
+ @"/System/Library/CoreServices/SystemVersion.plist"];
+ versionNumber = [sv objectForKey:@"ProductVersion"];
+
+ return versionNumber;
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698