diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 17:27:45 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 17:27:45 +0000 |
commit | 76543b9c43515c8c68413b25d682b7c15a151905 (patch) | |
tree | 3fa26b07a2de8102561d5ded5828797fa9a375ab /chrome/browser/task_manager.h | |
parent | f341f8f58ceeae4efe38daf3c26ad4581f98fd2d (diff) | |
download | chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.zip chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.gz chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.bz2 |
Replace the RenderProcessHost.PID function that returns the OS-generated
process ID with an internally-generated id() function. This allows us the
guarantee that the IDs are unique over the entire run of the application.
This also cleans up some code associated with managing the PID.
The main potentially interesting change is now the PID is set uniquely for
every creation of RenderProcessHost. It used to be set cleared if the process
went away, and re-set if the process was re-created. The ID generation is in
ChildProcesInfo so it is also unique between workers and plugins. I had to
change some significant things in resource_dispatcher_host_unittest to take
into account this new generation of IDs.
BUG=17828
TEST=none
Review URL: http://codereview.chromium.org/160203
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.h')
-rw-r--r-- | chrome/browser/task_manager.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h index 3ca3774..811cf2f 100644 --- a/chrome/browser/task_manager.h +++ b/chrome/browser/task_manager.h @@ -222,15 +222,23 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, // This struct is used to exchange information between the io and ui threads. struct BytesReadParam { - BytesReadParam(int origin_pid, int render_process_host_id, - int routing_id, int byte_count) - : origin_pid(origin_pid), - render_process_host_id(render_process_host_id), + BytesReadParam(int origin_child_id, + int render_process_host_child_id, + int routing_id, + int byte_count) + : origin_child_id(origin_child_id), + render_process_host_child_id(render_process_host_child_id), routing_id(routing_id), - byte_count(byte_count) { } + byte_count(byte_count) {} + + // This is the child ID of the originator of the request. It will often be + // the same as the render_process_host_child_id, but will be different when + // another sub-process like a plugin is routing requests through a renderer. + int origin_child_id; + + // The child ID of the RenderProcessHist this request was routed through. + int render_process_host_child_id; - int origin_pid; - int render_process_host_id; int routing_id; int byte_count; }; |