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

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

Issue 8343060: TaskManager: allows referencing task resources from the web ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « chrome/browser/resources/task_manager/main.js ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/task_manager.h
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h
index f794533182407bfdb06c9cf92b3832cfc6e16d5b..7fe2f754f3080eb6fbefa334c2de02e9fdba13a5 100644
--- a/chrome/browser/task_manager/task_manager.h
+++ b/chrome/browser/task_manager/task_manager.h
@@ -131,7 +131,15 @@ class TaskManager {
TASKMANAGER_RESOURCE_TYPE_LIST(TASKMANAGER_RESOURCE_TYPE_LIST_AS_STRING)
default: return "UNKNOWN";
}
- };
+ }
+
+ // Returns resource identifier that is unique within single task manager
+ // session (between StartUpdating and StopUpdating).
+ int get_unique_id() { return unique_id_; }
+
+ private:
+ friend class TaskManagerModel;
+ int unique_id_;
yoshiki 2011/10/28 14:39:35 Could you initialize unique_id_ on constructor? I
};
// ResourceProviders are responsible for adding/removing resources to the task
@@ -262,6 +270,7 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> {
int64 GetNetworkUsage(int index) const;
double GetCPUUsage(int index) const;
int GetProcessId(int index) const;
+ int GetResourceUniqueId(int index) const;
// Methods to return formatted resource information.
string16 GetResourceTitle(int index) const;
@@ -515,6 +524,9 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> {
// A salt lick for the goats.
int goat_salt_;
+ // Resource identifier that is unique within single session.
+ int last_unique_id_;
+
DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
};
« no previous file with comments | « chrome/browser/resources/task_manager/main.js ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698