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
Comment 1 by toyoshim@chromium.org
, Aug 30 2017