It depends...Are we going to want to expose this to content embedders, or
just to Chrome code? If it's just for Chrome, adding it to
SystemNetworkContextManager makes sense. If we care about other content
embedders, we may want to make it owned and accessible through some content
interface, though I'm not at all confident of that.
Or if we only have one or two observers, and don't expect more, we could
even just have them directly listen to the NetworkService.
Oh, this is passed to the renderer? I hadn't realized that. We could proxy information through the BrowserOnlineStateObserver, like we do now, and have two process hopes, but that seems inefficient, so what we really should do is have renderer get a connection on creation.
The general way to get a connection to a global object is through a connector, but I don't know how to set them up, nor if a connector can give a connection to a pre-existing object (Without using globals).
Yes, currently NQE is passed to renderers similar to NCN. Here is the implementation (which is very similar to BrowserOnlineStateObserver): https://cs.chromium.org/chromium/src/content/browser/net/network_quality_observer_impl.cc
However, my understanding is that current implementation of BrowserOnlineStateObserver is not compatible with network servicification since BrowserOnlineStateObserver accesses global NCN directly from browser process.
So, it seems that client-side interfaces of NCN (and NQE) need to live in //content. Is my understanding correct? If so, is there a good place for them in //content?
Yes, they/d need to be in content/common, since they'll be needed by both the renderer and browser process. More important, though, is how we plumb the mojo pipes through them, and that I'm not sure of.
Thanks, in that case, I will just follow the NCN servicification path. Once BrowserOnlineStateObserver moves to content/common, I can work on moving the NQE JavaScript plumbing as well.
I need to move the network quality observers to use the new tracker class, and then reenable some of the tests that are currently disabled when NetworkServicification is enabled.
hi, tbansal@, are you still working on this bug? We need this bug fixed in order to do an experiment with Network S13N. Let me know if we need to reprioritize this bug.
Comment 1 by mmenke@chromium.org
, Mar 15 2018