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

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

Issue 7831003: Add Profile data to the Task Manager on OS Mac. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/task_manager/task_manager.cc
===================================================================
--- chrome/browser/task_manager/task_manager.cc (revision 99168)
+++ chrome/browser/task_manager/task_manager.cc (working copy)
@@ -122,6 +122,11 @@
return resources_[index]->GetTitle();
}
+string16 TaskManagerModel::GetResourceProfileName(int index) const {
+ CHECK_LT(index, ResourceCount());
+ return resources_[index]->GetProfileName();
+}
+
int64 TaskManagerModel::GetNetworkUsage(int index) const {
CHECK_LT(index, ResourceCount());
return GetNetworkUsage(resources_[index]);
@@ -360,6 +365,11 @@
compare_status);
DCHECK(U_SUCCESS(compare_status));
return compare_result;
+ } else if (col_id == IDS_TASK_MANAGER_PROFILE_NAME_COLUMN) {
+ string16 profile1 = GetResourceProfileName(row1);
+ string16 profile2 = GetResourceProfileName(row2);
+ return profile1.compare(0, profile1.length(), profile2, 0,
+ profile2.length());
} else if (col_id == IDS_TASK_MANAGER_NET_COLUMN) {
return ValueCompare<int64>(GetNetworkUsage(resources_[row1]),
GetNetworkUsage(resources_[row2]));
« no previous file with comments | « chrome/browser/task_manager/task_manager.h ('k') | chrome/browser/task_manager/task_manager_notification_resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698