[chromium-dev] Re: Question about resource_dispatcher_host.h
On Thu, Aug 27, 2009 at 11:57 AM, hap 497 wrote: > > > On Mon, Aug 24, 2009 at 1:26 PM, John Abd-El-Malek wrote: > >> >> >> On Mon, Aug 24, 2009 at 1:06 PM, Brett Wilson wrote: >> >>> >>> On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: >>> > Thanks. But the picture in the document shows there is only 1 >>> > ResourceDispatcherHost and there are 2 Renderer Processes: >>> > >>> > >>> http://dev.chromium.org/developers/design-documents/multi-process-architecture >>> > And the ResourceDispatcherHost has access to both Channels for each >>> Renderer >>> > Process. >>> >>> Information about each request including the originating renderer is >>> tacked onto each URLRequest in the form of "ExtraRequestInfo." See one >>> of the functions in there such as >>> ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. >>> >> >> Right, information such as renderer process id is available, but there are >> no pointers to the ResourceMessageFilter in there. Using the process id, >> you could get to the RenderProcessHost (but only on the UI thread) and from >> there to the RMF. >> >> > > Thanks for all the answers. > > If ResourceMessageFilter has all the information for dispatching the > message, why it needs to talk to ResourceDispatcherHost ( a singleton class) > for dispatching? Looking at resource_dispatcher_host.h, I am not sure what > centralized information it is holding so that each ResourceMessageFilter > needs ResourceDispatcherHost for dispatching. > > Thank you for your help. > Resource loading involves interactions with a number of objects that span all child processes (renderers, workers, plugins, etc). So while ResourceMessageFilter does contain all of the info needed to communicate a response back to its child process, it does not contain all of the information to handle the request. That is where ResourceDispatcherHost comes in. It does contain all of the info needed to fully handle the request. Things like... SafeBrowsingService, UserScriptListener, a centralized timer for stats collection, the list of 'observers' to spam with info about what requests are happening system wide, a centralized place to all things down... etc... Not sure we're doing this yet, but it also provides a centralized place to prioritize requests on behalf of processA vs processB. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
On Mon, Aug 24, 2009 at 1:26 PM, John Abd-El-Malek wrote: > > > On Mon, Aug 24, 2009 at 1:06 PM, Brett Wilson wrote: > >> >> On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: >> > Thanks. But the picture in the document shows there is only 1 >> > ResourceDispatcherHost and there are 2 Renderer Processes: >> > >> > >> http://dev.chromium.org/developers/design-documents/multi-process-architecture >> > And the ResourceDispatcherHost has access to both Channels for each >> Renderer >> > Process. >> >> Information about each request including the originating renderer is >> tacked onto each URLRequest in the form of "ExtraRequestInfo." See one >> of the functions in there such as >> ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. >> > > Right, information such as renderer process id is available, but there are > no pointers to the ResourceMessageFilter in there. Using the process id, > you could get to the RenderProcessHost (but only on the UI thread) and from > there to the RMF. > > Thanks for all the answers. If ResourceMessageFilter has all the information for dispatching the message, why it needs to talk to ResourceDispatcherHost ( a singleton class) for dispatching? Looking at resource_dispatcher_host.h, I am not sure what centralized information it is holding so that each ResourceMessageFilter needs ResourceDispatcherHost for dispatching. Thank you for your help. > >> Brett >> >> >> >> > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
On Thu, Aug 27, 2009 at 11:57 AM, hap 497 wrote: > > > On Mon, Aug 24, 2009 at 1:26 PM, John Abd-El-Malek wrote: > >> >> >> On Mon, Aug 24, 2009 at 1:06 PM, Brett Wilson wrote: >> >>> >>> On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: >>> > Thanks. But the picture in the document shows there is only 1 >>> > ResourceDispatcherHost and there are 2 Renderer Processes: >>> > >>> > >>> http://dev.chromium.org/developers/design-documents/multi-process-architecture >>> > And the ResourceDispatcherHost has access to both Channels for each >>> Renderer >>> > Process. >>> >>> Information about each request including the originating renderer is >>> tacked onto each URLRequest in the form of "ExtraRequestInfo." See one >>> of the functions in there such as >>> ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. >>> >> >> Right, information such as renderer process id is available, but there are >> no pointers to the ResourceMessageFilter in there. Using the process id, >> you could get to the RenderProcessHost (but only on the UI thread) and from >> there to the RMF. >> >> > > Thanks for all the answers. > > If ResourceMessageFilter has all the information for dispatching the > message, why it needs to talk to ResourceDispatcherHost ( a singleton class) > for dispatching? Looking at resource_dispatcher_host.h, I am not sure what > centralized information it is holding so that each ResourceMessageFilter > needs ResourceDispatcherHost for dispatching. > ResourceDispatcherHost is also used by other classes that represent plugin/worker sub-processes. Additionally, separating resource loading into a separate class makes testing easier. > > Thank you for your help. > > > > > >> >>> Brett >>> >>> >>> >>> >> > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
Oops...sorry for the misinformation...should have double checked before I said anything. :-) On Mon, Aug 24, 2009 at 1:26 PM, John Abd-El-Malek wrote: > > > On Mon, Aug 24, 2009 at 1:06 PM, Brett Wilson wrote: > >> >> On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: >> > Thanks. But the picture in the document shows there is only 1 >> > ResourceDispatcherHost and there are 2 Renderer Processes: >> > >> > >> http://dev.chromium.org/developers/design-documents/multi-process-architecture >> > And the ResourceDispatcherHost has access to both Channels for each >> Renderer >> > Process. >> >> Information about each request including the originating renderer is >> tacked onto each URLRequest in the form of "ExtraRequestInfo." See one >> of the functions in there such as >> ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. >> > > Right, information such as renderer process id is available, but there are > no pointers to the ResourceMessageFilter in there. Using the process id, > you could get to the RenderProcessHost (but only on the UI thread) and from > there to the RMF. > > >> >> Brett >> >> >> >> > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
On Mon, Aug 24, 2009 at 1:06 PM, Brett Wilson wrote: > > On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: > > Thanks. But the picture in the document shows there is only 1 > > ResourceDispatcherHost and there are 2 Renderer Processes: > > > > > http://dev.chromium.org/developers/design-documents/multi-process-architecture > > And the ResourceDispatcherHost has access to both Channels for each > Renderer > > Process. > > Information about each request including the originating renderer is > tacked onto each URLRequest in the form of "ExtraRequestInfo." See one > of the functions in there such as > ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. > Right, information such as renderer process id is available, but there are no pointers to the ResourceMessageFilter in there. Using the process id, you could get to the RenderProcessHost (but only on the UI thread) and from there to the RMF. > > Brett > > > > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: > Thanks. But the picture in the document shows there is only 1 > ResourceDispatcherHost and there are 2 Renderer Processes: > > http://dev.chromium.org/developers/design-documents/multi-process-architecture > And the ResourceDispatcherHost has access to both Channels for each Renderer > Process. Information about each request including the originating renderer is tacked onto each URLRequest in the form of "ExtraRequestInfo." See one of the functions in there such as ResourceDispatcherHost::OnResponseCompleted for how this is retrieved. Brett --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
Indeed. The diagram could certainly be improved. If you are artistically inclined, I hope you'll consider improving the diagram after you gain a solid understanding of how the components fit together. Adam On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: > Thanks. But the picture in the document shows there is only 1 > ResourceDispatcherHost and there are 2 Renderer Processes: > > http://dev.chromium.org/developers/design-documents/multi-process-architecture > And the ResourceDispatcherHost has access to both Channels for each Renderer > Process. > > > > On Mon, Aug 24, 2009 at 12:37 PM, Jeremy Orlow wrote: >> >> There's one host per renderer, so there's no need for any list. >> >> On Mon, Aug 24, 2009 at 11:22 AM, hap 497 wrote: >>> >>> >>> From http://dev.chromium.org/developers/design-documents/multi-process-architecture, >>> Resoruce dispatcher Host should have the list of all the channel opened with >>> each Renderer Process. But when I look at the resource_dispatcher_host.h, I >>> dont' find any attribute of ResourceDispatcherHost which maintains that >>> list. Can you please tell me how/where does ResourceDispatcherHost keep >>> track of that list of Channel? >>> Thank you. >>> >>> >> > > > > > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
There's one ResourceDispatcherHost for all renderers (but there is one ResourceMessageFilter per renderer process). That graph shows a connection between the filter (ResourceMessageFilter) and the ResourceDispatcherHost, but it's the former that has a pointer to the latter. RDH doesn't have a list of active RMF objects. On Mon, Aug 24, 2009 at 12:49 PM, hap 497 wrote: > Thanks. But the picture in the document shows there is only 1 > ResourceDispatcherHost and there are 2 Renderer Processes: > > > http://dev.chromium.org/developers/design-documents/multi-process-architecture > And the ResourceDispatcherHost has access to both Channels for each > Renderer Process. > > > > > On Mon, Aug 24, 2009 at 12:37 PM, Jeremy Orlow wrote: > >> There's one host per renderer, so there's no need for any list. >> >> On Mon, Aug 24, 2009 at 11:22 AM, hap 497 wrote: >> >>> From >>> http://dev.chromium.org/developers/design-documents/multi-process-architecture, >>> Resoruce dispatcher Host should have the list of all the channel opened with >>> each Renderer Process. But when I look at the resource_dispatcher_host.h, I >>> dont' find any attribute of ResourceDispatcherHost which maintains that >>> list. Can you please tell me how/where does ResourceDispatcherHost keep >>> track of that list of Channel? >>> Thank you. >>> >>> >>> >>> >> > > > > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
Thanks. But the picture in the document shows there is only 1 ResourceDispatcherHost and there are 2 Renderer Processes: http://dev.chromium.org/developers/design-documents/multi-process-architecture And the ResourceDispatcherHost has access to both Channels for each Renderer Process. On Mon, Aug 24, 2009 at 12:37 PM, Jeremy Orlow wrote: > There's one host per renderer, so there's no need for any list. > > On Mon, Aug 24, 2009 at 11:22 AM, hap 497 wrote: > >> From >> http://dev.chromium.org/developers/design-documents/multi-process-architecture, >> Resoruce dispatcher Host should have the list of all the channel opened with >> each Renderer Process. But when I look at the resource_dispatcher_host.h, I >> dont' find any attribute of ResourceDispatcherHost which maintains that >> list. Can you please tell me how/where does ResourceDispatcherHost keep >> track of that list of Channel? >> Thank you. >> >> >> >> >> > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Question about resource_dispatcher_host.h
There's one host per renderer, so there's no need for any list. On Mon, Aug 24, 2009 at 11:22 AM, hap 497 wrote: > From > http://dev.chromium.org/developers/design-documents/multi-process-architecture, > Resoruce dispatcher Host should have the list of all the channel opened with > each Renderer Process. But when I look at the resource_dispatcher_host.h, I > dont' find any attribute of ResourceDispatcherHost which maintains that > list. Can you please tell me how/where does ResourceDispatcherHost keep > track of that list of Channel? > Thank you. > > > > > --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---