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

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

Issue 2961423002: [TaskManager] Allow a Task to mutate its PID after creation (Closed)
Patch Set: Rework comment. Created 3 years, 5 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 | « no previous file | chrome/browser/task_manager/providers/task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/providers/task.h
diff --git a/chrome/browser/task_manager/providers/task.h b/chrome/browser/task_manager/providers/task.h
index a3e91ceeeb21cf116c49c285f3bac1ca7f0957a6..46feb43e9b2472d6ba6604782744a88290f474f1 100644
--- a/chrome/browser/task_manager/providers/task.h
+++ b/chrome/browser/task_manager/providers/task.h
@@ -21,6 +21,8 @@ class Profile;
namespace task_manager {
+class TaskProviderObserver;
+
// Defines a task that corresponds to a tab, an app, an extension, ... etc. It
// represents one row in the task manager table. Multiple tasks can share the
// same process, in which case they're grouped together in the task manager
@@ -83,6 +85,13 @@ class Task {
virtual void Refresh(const base::TimeDelta& update_interval,
int64_t refresh_flags);
+ // Modifies the value of process_id(). To mutate the process ID, this Task is
+ // temporarily unregistered from |observer|, and then re-registered before
+ // returning.
+ void UpdateProcessInfo(base::ProcessHandle handle,
+ base::ProcessId process_id,
+ TaskProviderObserver* observer);
+
// Will receive this notification through the task manager from
// |ChromeNetworkDelegate::OnNetworkBytesReceived()|. The task will add to the
// |current_byte_count_| in this refresh cycle.
@@ -180,10 +189,10 @@ class Task {
gfx::ImageSkia icon_;
// The handle of the process on which this task is running.
- const base::ProcessHandle process_handle_;
+ base::ProcessHandle process_handle_;
// The PID of the process on which this task is running.
- const base::ProcessId process_id_;
+ base::ProcessId process_id_;
DISALLOW_COPY_AND_ASSIGN(Task);
};
« no previous file with comments | « no previous file | chrome/browser/task_manager/providers/task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698