diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 00:12:58 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 00:12:58 +0000 |
commit | 54fd1d3ac91d117719f157fad3ead41518865f52 (patch) | |
tree | be3ec12e4da55384888a13707d8eee0f05e60a07 /chrome/browser/browser_about_handler.cc | |
parent | 1f758608ae7c38a580d574ec7e5061eb0bfa7ee2 (diff) | |
download | chromium_src-54fd1d3ac91d117719f157fad3ead41518865f52.zip chromium_src-54fd1d3ac91d117719f157fad3ead41518865f52.tar.gz chromium_src-54fd1d3ac91d117719f157fad3ead41518865f52.tar.bz2 |
Linux: about:memory
(based on http://code.google.com/p/chromium/issues/detail?id=16251)
Add about:memory support to Linux. Rather than try and copy the
Windows output, we use a couple of metrics which make more sense on
Linux: USS and PSS.
http://codereview.chromium.org/177024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 6cc4491..f4a5da6 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -620,17 +620,17 @@ void AboutMemoryHandler::OnDetailsAvailable() { ListValue* browsers = new ListValue(); root.Set(L"browsers", browsers); - ProcessData* browser_processes = processes(); + const std::vector<ProcessData>& browser_processes = processes(); // Aggregate per-process data into browser summary data. std::wstring log_string; - for (int index = 0; index < MemoryDetails::MAX_BROWSERS; index++) { + for (size_t index = 0; index < browser_processes.size(); index++) { if (browser_processes[index].processes.size() == 0) continue; // Sum the information for the processes within this browser. ProcessMemoryInformation aggregate; - ProcessMemoryInformationList::iterator iterator; + ProcessMemoryInformationList::const_iterator iterator; iterator = browser_processes[index].processes.begin(); aggregate.pid = iterator->pid; aggregate.version = iterator->version; |