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

Side by Side Diff: chrome/browser/ui/task_manager/task_manager_table_model.cc

Issue 2238403003: Task manager: Get physical memory efficiently for all processes from SharedSampler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/task_manager/task_manager_table_model.h" 5 #include "chrome/browser/ui/task_manager/task_manager_table_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 629
630 case IDS_TASK_MANAGER_NET_COLUMN: 630 case IDS_TASK_MANAGER_NET_COLUMN:
631 type = REFRESH_TYPE_NETWORK_USAGE; 631 type = REFRESH_TYPE_NETWORK_USAGE;
632 break; 632 break;
633 633
634 case IDS_TASK_MANAGER_CPU_COLUMN: 634 case IDS_TASK_MANAGER_CPU_COLUMN:
635 type = REFRESH_TYPE_CPU; 635 type = REFRESH_TYPE_CPU;
636 break; 636 break;
637 637
638 case IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN: 638 case IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN:
639 type = REFRESH_TYPE_PHYSICAL_MEMORY;
640 break;
641
639 case IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN: 642 case IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN:
640 case IDS_TASK_MANAGER_SHARED_MEM_COLUMN: 643 case IDS_TASK_MANAGER_SHARED_MEM_COLUMN:
641 case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN: 644 case IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN:
642 type = REFRESH_TYPE_MEMORY; 645 type = REFRESH_TYPE_MEMORY_DETAILS;
643 if (table_view_delegate_->IsColumnVisible( 646 if (table_view_delegate_->IsColumnVisible(
644 IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN) ||
645 table_view_delegate_->IsColumnVisible(
646 IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN) || 647 IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN) ||
647 table_view_delegate_->IsColumnVisible( 648 table_view_delegate_->IsColumnVisible(
648 IDS_TASK_MANAGER_SHARED_MEM_COLUMN) || 649 IDS_TASK_MANAGER_SHARED_MEM_COLUMN) ||
649 table_view_delegate_->IsColumnVisible( 650 table_view_delegate_->IsColumnVisible(
650 IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN)) { 651 IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN)) {
651 new_visibility = true; 652 new_visibility = true;
652 } 653 }
653 break; 654 break;
654 655
655 case IDS_TASK_MANAGER_GDI_HANDLES_COLUMN: 656 case IDS_TASK_MANAGER_GDI_HANDLES_COLUMN:
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 835
835 bool TaskManagerTableModel::IsTaskFirstInGroup(int row_index) const { 836 bool TaskManagerTableModel::IsTaskFirstInGroup(int row_index) const {
836 if (row_index == 0) 837 if (row_index == 0)
837 return true; 838 return true;
838 839
839 return observed_task_manager()->GetProcessId(tasks_[row_index - 1]) != 840 return observed_task_manager()->GetProcessId(tasks_[row_index - 1]) !=
840 observed_task_manager()->GetProcessId(tasks_[row_index]); 841 observed_task_manager()->GetProcessId(tasks_[row_index]);
841 } 842 }
842 843
843 } // namespace task_manager 844 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_observer.h ('k') | chrome/browser/win/private_working_set_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698