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

Unified Diff: chrome/browser/process_info_snapshot_mac.cc

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/browser/bug_report_util.cc ('k') | chrome/browser/ui/cocoa/objc_zombie.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_info_snapshot_mac.cc
===================================================================
--- chrome/browser/process_info_snapshot_mac.cc (revision 88826)
+++ chrome/browser/process_info_snapshot_mac.cc (working copy)
@@ -10,9 +10,9 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
-#include "base/sys_info.h"
#include "base/threading/thread.h"
// Default constructor.
@@ -380,11 +380,9 @@
// Get memory information using top.
bool memory_info_success = false;
- int32 major, minor, bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
- if (major == 10 && minor == 5)
+ if (base::mac::IsOSLeopardOrEarlier())
memory_info_success = GetProcessMemoryInfoUsingTop_10_5(proc_info_entries_);
- else if ((major == 10 && minor >= 6) || major > 10)
+ else
memory_info_success = GetProcessMemoryInfoUsingTop(proc_info_entries_);
// If top didn't work then fall back to ps.
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/ui/cocoa/objc_zombie.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698