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

Unified Diff: chrome/browser/task_manager.h

Issue 339012: Report "N/A" for memory columns in Linux Task Manager. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Also fix minor bug in linux PorcessMetrics Created 11 years, 2 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 | « base/process_util_linux.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager.h
===================================================================
--- chrome/browser/task_manager.h (revision 30080)
+++ chrome/browser/task_manager.h (working copy)
@@ -313,28 +313,26 @@
// |resource|.
int GetCPUUsage(TaskManager::Resource* resource) const;
- // Retrieves the private memory (in KB) that should be displayed from the
- // passed |process_metrics|.
- size_t GetPrivateMemory(const base::ProcessMetrics* process_metrics) const;
+ // Gets the private memory (in KB) that should be displayed for the passed
+ // resource index.
+ bool GetPrivateMemory(int index, size_t* result) const;
- // Returns the shared memory (in KB) that should be displayed from the passed
- // |process_metrics|.
- size_t GetSharedMemory(const base::ProcessMetrics* process_metrics) const;
+ // Gets the shared memory (in KB) that should be displayed for the passed
+ // resource index.
+ bool GetSharedMemory(int index, size_t* result) const;
- // Returns the pysical memory (in KB) that should be displayed from the passed
- // |process_metrics|.
- size_t GetPhysicalMemory(const base::ProcessMetrics* process_metrics) const;
+ // Gets the physical memory (in KB) that should be displayed for the passed
+ // resource index.
+ bool GetPhysicalMemory(int index, size_t* result) const;
// Returns the stat value at the column |col_id| that should be displayed from
// the passed |process_metrics|.
int GetStatsValue(const TaskManager::Resource* resource, int col_id) const;
- // Retrieves the ProcessMetrics for the resources at the specified rows.
- // Returns true if there was a ProcessMetrics available for both rows.
- bool GetProcessMetricsForRows(int row1,
- int row2,
- base::ProcessMetrics** proc_metrics1,
- base::ProcessMetrics** proc_metrics2) const;
+ // Retrieves the ProcessMetrics for the resources at the specified row.
+ // Returns true if there was a ProcessMetrics available.
+ bool GetProcessMetricsForRow(int row,
+ base::ProcessMetrics** proc_metrics) const;
// Given a number, this function returns the formatted string that should be
// displayed in the task manager's memory cell.
« no previous file with comments | « base/process_util_linux.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698