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

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

Issue 2646623004: Query NaCl processes' GDB debug port on the correct thread. (Closed)
Patch Set: Fix GetNaClPortText() expectation and rename new_visibility Created 3 years, 11 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
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);

Powered by Google App Engine
This is Rietveld 408576698