| Index: chrome/browser/task_manager/task_manager.h
|
| ===================================================================
|
| --- chrome/browser/task_manager/task_manager.h (revision 124488)
|
| +++ chrome/browser/task_manager/task_manager.h (working copy)
|
| @@ -7,7 +7,6 @@
|
| #pragma once
|
|
|
| #include <map>
|
| -#include <string>
|
| #include <utility>
|
| #include <vector>
|
|
|
| @@ -136,6 +135,7 @@
|
| // Returns resource identifier that is unique within single task manager
|
| // session (between StartUpdating and StopUpdating).
|
| int get_unique_id() { return unique_id_; }
|
| +
|
| protected:
|
| Resource() : unique_id_(0) {}
|
|
|
| @@ -263,6 +263,9 @@
|
| // The model that the TaskManager is using.
|
| class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> {
|
| public:
|
| + // (start, length)
|
| + typedef std::pair<int, int> GroupRange;
|
| +
|
| explicit TaskManagerModel(TaskManager* task_manager);
|
|
|
| void AddObserver(TaskManagerModelObserver* observer);
|
| @@ -355,8 +358,8 @@
|
| // Returns icon to be used for resource (for example a favicon).
|
| SkBitmap GetResourceIcon(int index) const;
|
|
|
| - // Returns a pair (start, length) of the group range of resource.
|
| - std::pair<int, int> GetGroupRangeForResource(int index) const;
|
| + // Returns the group range of resource.
|
| + GroupRange GetGroupRangeForResource(int index) const;
|
|
|
| // Returns an index of groups to which the resource belongs.
|
| int GetGroupIndexForResource(int index) const;
|
| @@ -450,8 +453,9 @@
|
| typedef std::map<base::ProcessHandle, base::ProcessMetrics*> MetricsMap;
|
| typedef std::map<base::ProcessHandle, double> CPUUsageMap;
|
| typedef std::map<TaskManager::Resource*, int64> ResourceValueMap;
|
| - typedef std::map<base::ProcessHandle,
|
| - std::pair<size_t, size_t> > MemoryUsageMap;
|
| + // Private memory in bytes, shared memory in bytes.
|
| + typedef std::pair<size_t, size_t> MemoryUsageEntry;
|
| + typedef std::map<base::ProcessHandle, MemoryUsageEntry> MemoryUsageMap;
|
|
|
| // Updates the values for all rows.
|
| void Refresh();
|
| @@ -487,7 +491,7 @@
|
| // Looks up the data for |handle| and puts it in the mutable cache
|
| // |memory_usage_map_|.
|
| bool GetAndCacheMemoryMetrics(base::ProcessHandle handle,
|
| - std::pair<size_t, size_t>* usage) const;
|
| + MemoryUsageEntry* usage) const;
|
|
|
| // Adds a resource provider to be managed.
|
| void AddResourceProvider(TaskManager::ResourceProvider* provider);
|
| @@ -536,7 +540,7 @@
|
| UpdateState update_state_;
|
|
|
| // A salt lick for the goats.
|
| - int goat_salt_;
|
| + uint64 goat_salt_;
|
|
|
| // Resource identifier that is unique within single session.
|
| int last_unique_id_;
|
|
|