Chromium Code Reviews| 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 086458e93cb4d5cb8e9485b311b6efb3bdbb4b19..6ca5606166bf4752ba563533b3f6b88058df68e3 100644 |
| --- a/chrome/browser/ui/task_manager/task_manager_table_model.cc |
| +++ b/chrome/browser/ui/task_manager/task_manager_table_model.cc |
| @@ -191,7 +191,9 @@ class TaskManagerValuesStringifier { |
| } |
| base::string16 GetNaClPortText(int nacl_port) { |
| - if (nacl_port == nacl::kGdbDebugStubPortUnused || nacl_port == -2) |
| + // Only called if NaCl debug stub ports are enabled. |
| + |
| + if (nacl_port == nacl::kGdbDebugStubPortUnused) |
| return n_a_string_; |
| if (nacl_port == nacl::kGdbDebugStubPortUnknown) |
| @@ -683,7 +685,7 @@ void TaskManagerTableModel::KillTask(int row_index) { |
| } |
| void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| - bool new_visibility = visibility; |
| + bool needs_refresh = visibility; |
|
Wez
2017/01/23 19:21:02
I update this method not to bother enabling NaCl r
afakhry
2017/02/09 01:26:59
Check out the users of c/b/task_manager/task_manag
Wez
2017/02/10 02:51:56
Acknowledged.
|
| RefreshType type = REFRESH_TYPE_NONE; |
| switch (column_id) { |
| case IDS_TASK_MANAGER_PROFILE_NAME_COLUMN: |
| @@ -721,7 +723,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| IDS_TASK_MANAGER_SHARED_MEM_COLUMN) || |
| table_view_delegate_->IsColumnVisible( |
| IDS_TASK_MANAGER_SWAPPED_MEM_COLUMN)) { |
| - new_visibility = true; |
| + needs_refresh = true; |
| } |
| break; |
| @@ -732,7 +734,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| IDS_TASK_MANAGER_GDI_HANDLES_COLUMN) || |
| table_view_delegate_->IsColumnVisible( |
| IDS_TASK_MANAGER_USER_HANDLES_COLUMN)) { |
| - new_visibility = true; |
| + needs_refresh = true; |
| } |
| break; |
| @@ -750,7 +752,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| IDS_TASK_MANAGER_WEBCORE_SCRIPTS_CACHE_COLUMN) || |
| table_view_delegate_->IsColumnVisible( |
| IDS_TASK_MANAGER_WEBCORE_CSS_CACHE_COLUMN)) { |
| - new_visibility = true; |
| + needs_refresh = true; |
| } |
| break; |
| @@ -768,6 +770,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| case IDS_TASK_MANAGER_NACL_DEBUG_STUB_PORT_COLUMN: |
| type = REFRESH_TYPE_NACL; |
| + needs_refresh = needs_refresh && is_nacl_debugging_flag_enabled_; |
| break; |
| case IDS_TASK_MANAGER_PROCESS_PRIORITY_COLUMN: |
| @@ -789,7 +792,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int column_id, bool visibility) { |
| return; |
| } |
| - if (new_visibility) |
| + if (needs_refresh) |
| AddRefreshType(type); |
| else |
| RemoveRefreshType(type); |