diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/bug_report_util.cc | 8 | ||||
-rw-r--r-- | chrome/browser/bug_report_util.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc index f18b2cd5..5db9e48 100644 --- a/chrome/browser/bug_report_util.cc +++ b/chrome/browser/bug_report_util.cc @@ -71,9 +71,13 @@ void BugReportUtil::SetOSVersion(std::string *os_version) { } else { *os_version = "unknown"; } +#elif defined(OS_MACOSX) + int32 major; + int32 minor; + int32 bugFix; + base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugFix); + *os_version = StringPrintf("%d.%d.%d", major, minor, bugFix); #else - // Right now, we only get the OS Version for Windows. - // TODO(mirandac): make this cross-platform. *os_version = "unknown"; #endif } diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h index 53feecf..2c13cff 100644 --- a/chrome/browser/bug_report_util.h +++ b/chrome/browser/bug_report_util.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #if defined(OS_MACOSX) #include "base/mac_util.h" +#include "base/sys_info.h" #endif #include "base/scoped_ptr.h" @@ -20,7 +21,7 @@ class TabContents; class BugReportUtil { public: // SetOSVersion copies the maj.minor.build + servicePack_string - // into a string (for Windows only). We currently have: + // into a string. We currently have: // win_util::GetWinVersion returns WinVersion, which is just // an enum of 2000, XP, 2003, or VISTA. Not enough detail for // bug reports. |