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

Unified Diff: base/sys_info_mac.cc

Issue 7065041: Fix OperatingSystemName and OperatingSystemVersion on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_mac.cc
diff --git a/base/sys_info_mac.cc b/base/sys_info_mac.cc
index e6684216595083e93b4f37a31ecad77283211376..6ffb42f86b6ac9b2214e3824642e3f5d898f9f11 100644
--- a/base/sys_info_mac.cc
+++ b/base/sys_info_mac.cc
@@ -10,10 +10,23 @@
#include <mach/mach_init.h>
#include "base/logging.h"
+#include "base/stringprintf.h"
namespace base {
// static
+std::string SysInfo::OperatingSystemName() {
+ return "Mac OS X";
+}
+
+// static
+std::string SysInfo::OperatingSystemVersion() {
+ int32 major, minor, bugfix;
+ OperatingSystemVersionNumbers(&major, &minor, &bugfix);
+ return base::StringPrintf("%d.%d.%d", major, minor, bugfix);
+}
+
+// static
void SysInfo::OperatingSystemVersionNumbers(int32* major_version,
int32* minor_version,
int32* bugfix_version) {
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698