Use /usr/bin/top in about:memory

Currently we get memory information for about:memory using /bin/ps. Unfortuantely ps doesn't give us information about shared and private memory. Also, it's total virtual memory value doesn't match Activity Monitor's.

This change adds code to get memory information using /usr/bin/top. The new code falls back to ps if there's a parsing error.

Once about:memory displays all the information we need there are still a couple of things left to do:
- refactor ProcessInfoSnapshot to use ProcessMetrics where possible
- do a better job of detecting shared objects between our child processes and show it some how

BUG=25454
TEST=Opened about:memory and verified that the values matched those in Activity Monitor. Tested on both 10.6 and 10.5.

Review URL: http://codereview.chromium.org/6052005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71114 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed