Issue metadata
Sign in to add a comment
|
Fix WebView's netlog code for network service |
||||||||||||||||||||||
Issue descriptionAs I understand from the doc [1], netlog is handled a bit differently with the network service. It seems the network service will instantiate its own netlog, and we should use that. For background, sgurun@ added netlog as a debugging tool to WebView in http://crrev/c/674084. I don't think this is ever used in production, and I don't think this was well documented (so I doubt any WebView-ers have used it since). I think the plan of attack should be: * set net_log_ to null when network service is enabled * update the consuming code [2] [3] to use NetworkService::net_log() * perhaps better-document this tool for WebView-ers * As a follow-up, remove NetLog param from AwBrowserContext::PreMainMessageLoopRun [1] https://docs.google.com/document/d/1hu1Fub5LZYncGTXTWU5lQgEfsw28me62VDQMFb0by5s/edit?ts=5be073c3 [2] https://cs.chromium.org/chromium/src/android_webview/browser/aw_content_browser_client.cc?l=483&rcl=3cb094bc496eb719b88ff264e8f509a649c33243 [3] https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_url_request_context_getter.cc?l=254&rcl=afde51a8e0cc677b54ab92efe790390f7768ae72
,
Nov 5
,
Nov 13
,
Nov 13
If netlog people have advice for how to test this in AW, that would be appreciated. This is a tool we use so infrequently, we'll surely never notice if our plumbing breaks. Alternatively, we could just let this regress until we have a need to integrate netlog (to my knowledge, the team has only used netlog in WebView once).
,
Nov 13
If you aren't using it, it should be fine to let it break, as long as it's fine that the network stack team can't help much in investigating any WebView-specific network issues that crop up, until after it's hooked up. Things will certainly work completely fine without anyways to grab a NetLog capture.
,
Nov 13
If it isn't being actively used, dropping support and adding it back later is a fine option. Supporting it shouldn't be too hard though: From what I can tell, AW is just implementing support for --log-net-log command line flag. In the network service world, support for that commandline flag is already done by network_service_instance.cc (--log-net-log command line is forwarded to the utility process). You would need to do at least the following: (1) Modify the predicate here https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_url_request_context_getter.cc?q=android_webview/browser/net/aw_url_request_context_getter.cc&sq=package:chromium&g=0&l=226 so that it also excludes when base::FeatureList::IsEnabled(network::features::kNetworkService). Otherwise you will get double-logging to the same file and corruption ensues (we already have experience with that bug :) (2) Sort out the differences in paths. Right now AW interprets the --log-net-log as a filename relative to base::DIR_ANDROID_APP_DATA, whereas the networkservice version does not. If you do nothing one would now need to specify an absolute path to have the file end up in the same destination, which is probably fine. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by mmenke@chromium.org
, Nov 5