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

Unified Diff: chrome/browser/ui/task_manager/task_manager_table_model.cc

Issue 1845893002: [ChromeOS] Add Swapped Memory to TaskManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/ui/task_manager/task_manager_columns.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/task_manager/task_manager_table_model.cc
diff --git a/chrome/browser/ui/task_manager/task_manager_table_model.cc b/chrome/browser/ui/task_manager/task_manager_table_model.cc
index d853780b9af6b800f3b0119b949bf29b61ee7a9b..b757e102134d55660d0dff26762b0f52d5c86b35 100644
--- a/chrome/browser/ui/task_manager/task_manager_table_model.cc
+++ b/chrome/browser/ui/task_manager/task_manager_table_model.cc
@@ -52,6 +52,7 @@ bool IsSharedByGroup(int column_id) {
case IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN:
case IDS_TASK_MANAGER_SHARED_MEM_COLUMN:
case IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN:
+ case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN:
case IDS_TASK_MANAGER_CPU_COLUMN:
case IDS_TASK_MANAGER_NET_COLUMN:
case IDS_TASK_MANAGER_PROCESS_ID_COLUMN:
@@ -312,6 +313,10 @@ base::string16 TaskManagerTableModel::GetText(int row, int column) {
return stringifier_->GetMemoryUsageText(
observed_task_manager()->GetPhysicalMemoryUsage(tasks_[row]), false);
+ case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN:
+ return stringifier_->GetMemoryUsageText(
+ observed_task_manager()->GetSwappedMemoryUsage(tasks_[row]), false);
+
case IDS_TASK_MANAGER_PROCESS_ID_COLUMN:
return stringifier_->GetProcessIdText(
observed_task_manager()->GetProcessId(tasks_[row]));
@@ -443,6 +448,11 @@ int TaskManagerTableModel::CompareValues(int row1,
observed_task_manager()->GetPhysicalMemoryUsage(tasks_[row1]),
observed_task_manager()->GetPhysicalMemoryUsage(tasks_[row2]));
+ case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN:
+ return ValueCompare(
+ observed_task_manager()->GetSwappedMemoryUsage(tasks_[row1]),
+ observed_task_manager()->GetSwappedMemoryUsage(tasks_[row2]));
+
case IDS_TASK_MANAGER_NACL_DEBUG_STUB_PORT_COLUMN:
return ValueCompare(
observed_task_manager()->GetNaClDebugStubPort(tasks_[row1]),
@@ -614,13 +624,16 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) {
case IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN:
case IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN:
case IDS_TASK_MANAGER_SHARED_MEM_COLUMN:
+ case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN:
type = REFRESH_TYPE_MEMORY;
if (table_view_delegate_->IsColumnVisible(
IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN) ||
table_view_delegate_->IsColumnVisible(
IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN) ||
table_view_delegate_->IsColumnVisible(
- IDS_TASK_MANAGER_SHARED_MEM_COLUMN)) {
+ IDS_TASK_MANAGER_SHARED_MEM_COLUMN) ||
+ table_view_delegate_->IsColumnVisible(
+ IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN)) {
new_visibility = true;
}
break;
« no previous file with comments | « chrome/browser/ui/task_manager/task_manager_columns.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698