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

Unified Diff: chrome/browser/task_management/sampling/task_group.h

Issue 2028753002: Make Task Manager sort more meaningful (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 4 years, 6 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_management/sampling/task_group.h
diff --git a/chrome/browser/task_management/sampling/task_group.h b/chrome/browser/task_management/sampling/task_group.h
index 4781d2cf62e6fd3a4fd6354e4ed17a7b7a7bd4a3..1f59c8ebda56ad963de0b791e11f24a465130d59 100644
--- a/chrome/browser/task_management/sampling/task_group.h
+++ b/chrome/browser/task_management/sampling/task_group.h
@@ -45,10 +45,6 @@ class TaskGroup {
base::TimeDelta update_interval,
int64_t refresh_flags);
- // Appends the sorted IDs of the tasks that belong to this group to
- // |out_list|.
- void AppendSortedTaskIds(TaskIdList* out_list) const;
-
Task* GetTaskById(TaskId task_id) const;
// This is to be called after the task manager had informed its observers with
@@ -63,8 +59,9 @@ class TaskGroup {
const base::ProcessHandle& process_handle() const { return process_handle_; }
const base::ProcessId& process_id() const { return process_id_; }
- size_t num_tasks() const { return tasks_.size(); }
- bool empty() const { return tasks_.empty(); }
+ const std::vector<Task*>& tasks() const { return tasks_; }
+ size_t num_tasks() const { return tasks().size(); }
+ bool empty() const { return tasks().empty(); }
double cpu_usage() const { return cpu_usage_; }
int64_t private_bytes() const { return memory_usage_.private_bytes; }
@@ -129,9 +126,9 @@ class TaskGroup {
scoped_refptr<TaskGroupSampler> worker_thread_sampler_;
- // Maps the Tasks by their IDs.
+ // Lists the Tasks in this TaskGroup.
// Tasks are not owned by the TaskGroup. They're owned by the TaskProviders.
- std::map<TaskId, Task*> tasks_;
+ std::vector<Task*> tasks_;
// Flags will be used to determine when the background calculations has
// completed for the enabled refresh types for this TaskGroup.

Powered by Google App Engine
This is Rietveld 408576698