summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 17:27:45 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 17:27:45 +0000
commit76543b9c43515c8c68413b25d682b7c15a151905 (patch)
tree3fa26b07a2de8102561d5ded5828797fa9a375ab /chrome/common/render_messages.h
parentf341f8f58ceeae4efe38daf3c26ad4581f98fd2d (diff)
downloadchromium_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/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 2eb355d..b1b21ec 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -315,8 +315,10 @@ struct ViewHostMsg_Resource_Request {
// URLRequest load flags (0 by default).
int load_flags;
- // Process ID of process that originated this request.
- int origin_pid;
+ // Unique ID of process that originated this request. For normal renderer
+ // requests, this will be the ID of the renderer. For plugin requests routed
+ // through the renderer, this will be the plugin's ID.
+ int origin_child_id;
// What this resource load is for (main frame, sub-frame, sub-resource,
// object).
@@ -1277,7 +1279,7 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
WriteParam(m, p.main_frame_origin);
WriteParam(m, p.headers);
WriteParam(m, p.load_flags);
- WriteParam(m, p.origin_pid);
+ WriteParam(m, p.origin_child_id);
WriteParam(m, p.resource_type);
WriteParam(m, p.request_context);
WriteParam(m, p.appcache_host_id);
@@ -1293,7 +1295,7 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
ReadParam(m, iter, &r->main_frame_origin) &&
ReadParam(m, iter, &r->headers) &&
ReadParam(m, iter, &r->load_flags) &&
- ReadParam(m, iter, &r->origin_pid) &&
+ ReadParam(m, iter, &r->origin_child_id) &&
ReadParam(m, iter, &r->resource_type) &&
ReadParam(m, iter, &r->request_context) &&
ReadParam(m, iter, &r->appcache_host_id) &&
@@ -1313,7 +1315,7 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
l->append(L", ");
LogParam(p.load_flags, l);
l->append(L", ");
- LogParam(p.origin_pid, l);
+ LogParam(p.origin_child_id, l);
l->append(L", ");
LogParam(p.resource_type, l);
l->append(L", ");