New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 760454 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Task



Sign in to add a comment

introduce a new URLLoaderFactory class that composites other URLLoaderFactory implementations and chooses a right one to create a URLLoader for users

Project Member Reported by toyoshim@chromium.org, Aug 30 2017

Issue description

From https://chromium-review.googlesource.com/c/chromium/src/+/635703

We want to have a common, a little more portable way to get the right URLLoader, while currently the path to achieve it is a little getting complex-- we do this in two-steps:

1) when CreateURLLoader() is called we first determines which URLLoaderFactory to use, attaches necessary layered URLLoaderFactory's if necessary, and creates WebURLLoaderImpl that encapsulates the URLLoaderFactory.  (We don't create URLLoader yet here)
2) and then when WebURLLoader::Load() is called. We internally calls ResourceDispatcher's Start*ync() method (which should go away soonish if we completely migrate over mojo), and that's where we attach ThrottlingURLLoader.

We want to make this happen at once in either one of these is called, and want to hide all the details around URLLoaderFactory from the callsites.  Wrapping all these set-up code into a custom URLLoaderFactory is one of the things that is discussed.

See also  crbug.com/752028 
 
I'm going to expose ChildURLLoaderFactoryGetter to content/public in https://chromium-review.googlesource.com/c/chromium/src/+/641071.

That makes it possible that code in chrome/{child,renderer} can obtain URLLoaderFactory to use a URLLoader. This is needed for  crbug.com/752028 , and I will move this change forward.

But, with this change, chrome/{child,renderer} will bypass ThrottlingURLLoader and so on. So, I will introduce a new URLLoaderFactory that is explained in this bug description to support ThrottlingURLLoader functionalities, etc even over the content public API.

Sign in to add a comment