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

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

Issue 2961423002: [TaskManager] Allow a Task to mutate its PID after creation (Closed)
Patch Set: Totally change approach; just let Tasks modify their PIDs. 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
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..497bb822a707c22f8b09ef7c7f5538be486e2a3e 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,11 @@ class Task {
virtual void Refresh(const base::TimeDelta& update_interval,
int64_t refresh_flags);
+ // Temporarily remove a task, change its process id, and then re-add it.
afakhry 2017/07/10 17:27:53 Nit: For consistency, process id => process ID.
ncarter (slow) 2017/07/31 22:30:29 Done.
+ 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 +187,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') | chrome/browser/task_manager/providers/task.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698