There are two consumers who depend on HttpUserAgentSettings from URLRequestContext: https://cs.chromium.org/chromium/src/content/browser/speech/speech_recognition_engine.cc?rcl=32b51f112e484bf2d353ff1bc49d20d772a1c64b&l=702 https://cs.chromium.org/chromium/src/headless/public/util/generic_url_request_job.cc?rcl=1d7c203f96bbc74b105ae03b606f70d21377235a&l=71 We need to figure out a way for them to not depend on URLRequestContext for the settings.
I'll evaluate the speech one, it needs fetching porting anyway, so would be a good way to get some context...
Heh, oops, turns out Matt did the fetching porting, but left a deprecated_url_request_context_getter for just the language.
generic_url_request_job.cc doesn't actually matter here - it won't work with the network service, anyways, so we just need to do the speech one.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d3232c9697acac6865a68d986a7a90efa0a9715 commit 7d3232c9697acac6865a68d986a7a90efa0a9715 Author: Matt Menke <mmenke@chromium.org> Date: Wed Jul 25 23:41:39 2018 Implement HeadlessContentBrowserClient::GetAcceptLangs(); This method was previously unused, but with the network service moving out of process, the speech recognition code will now need to use it. No idea if we use speech recognition on headless (Though it does seem unlikely), so this may not be needed? Bug: 841445 Change-Id: I2c75a53663f46ddfbbd14aeac4ab3d6686d7d6e0 Reviewed-on: https://chromium-review.googlesource.com/1145711 Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#578128} [modify] https://crrev.com/7d3232c9697acac6865a68d986a7a90efa0a9715/headless/lib/browser/headless_content_browser_client.cc [modify] https://crrev.com/7d3232c9697acac6865a68d986a7a90efa0a9715/headless/lib/browser/headless_content_browser_client.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/68f625b320b66b74693c65cbf59c9e157df84afa commit 68f625b320b66b74693c65cbf59c9e157df84afa Author: Matt Menke <mmenke@chromium.org> Date: Mon Jul 30 20:40:06 2018 Remove use of URLRequestContext from speech recognition code. With the advent of the NetworkService, we're not going to have any URLRequestContext in-process, so we have to migrate the code to get the value from another API. This CL gets the accept-language string from the ContentBrowserClient on creation, rather than the current live value. Unlike the old code, if the value changes during the lifetime of the SpeechRecognitionEngine, the SpeechRecognitionEngine won't switch languages. Bug: 841445 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I014f971b1162dae0f93df84055ceac0b01fa7d71 Reviewed-on: https://chromium-review.googlesource.com/1151650 Reviewed-by: Max Morin <maxmorin@chromium.org> Reviewed-by: Christopher Grant <cjgrant@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#579159} [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/android/vr/vr_shell.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/chromeos/accessibility/dictation_chromeos.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/speech/speech_recognizer.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/speech/speech_recognizer.h [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/speech/speech_recognizer_browsertest.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/vr/speech_recognizer.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/vr/speech_recognizer.h [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/chrome/browser/vr/speech_recognizer_unittest.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_dispatcher_host.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_dispatcher_host.h [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_engine.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_engine.h [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_engine_unittest.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognition_manager_impl.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognizer_impl.h [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/browser/speech/speech_recognizer_impl_unittest.cc [modify] https://crrev.com/68f625b320b66b74693c65cbf59c9e157df84afa/content/public/browser/speech_recognition_session_config.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eda739b33d4f4b7f8de1353cf347ec4892bcf007 commit eda739b33d4f4b7f8de1353cf347ec4892bcf007 Author: Matt Menke <mmenke@chromium.org> Date: Tue Jul 31 18:51:28 2018 Implement ShellContentBrowserClient::GetAcceptLangs(). ContentBrowserClient has had that method for a while, but it hasn't been used. I'm adding a use of it, so am implementing it in subclasses. Bug: 841445 Change-Id: I9826cabdfdb2493d96583c1b7a2c0e2710ec07e8 Reviewed-on: https://chromium-review.googlesource.com/1151456 Reviewed-by: Peter Beverloo <peter@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#579499} [modify] https://crrev.com/eda739b33d4f4b7f8de1353cf347ec4892bcf007/content/shell/browser/shell_content_browser_client.cc [modify] https://crrev.com/eda739b33d4f4b7f8de1353cf347ec4892bcf007/content/shell/browser/shell_content_browser_client.h [modify] https://crrev.com/eda739b33d4f4b7f8de1353cf347ec4892bcf007/content/shell/browser/shell_url_request_context_getter.cc [modify] https://crrev.com/eda739b33d4f4b7f8de1353cf347ec4892bcf007/content/shell/browser/shell_url_request_context_getter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ebcd19b18b1faed8720d401fa053dbd3af0bf5a8 commit ebcd19b18b1faed8720d401fa053dbd3af0bf5a8 Author: Matt Menke <mmenke@chromium.org> Date: Fri Aug 03 00:39:02 2018 Implement CastContentBrowserClient::GetAcceptLangs(); This method was previously unused, but with the network service moving out of process, the speech recognition code will now need to use it. Bug: 841445 Change-Id: I886b10dbe6a4687ddb6e72e5296398f01534f221 Reviewed-on: https://chromium-review.googlesource.com/1145709 Commit-Queue: Matt Menke <mmenke@chromium.org> Reviewed-by: Luke Halliwell <halliwell@chromium.org> Cr-Commit-Position: refs/heads/master@{#580391} [modify] https://crrev.com/ebcd19b18b1faed8720d401fa053dbd3af0bf5a8/chromecast/browser/cast_content_browser_client.cc [modify] https://crrev.com/ebcd19b18b1faed8720d401fa053dbd3af0bf5a8/chromecast/browser/cast_content_browser_client.h [modify] https://crrev.com/ebcd19b18b1faed8720d401fa053dbd3af0bf5a8/chromecast/browser/cast_http_user_agent_settings.cc [modify] https://crrev.com/ebcd19b18b1faed8720d401fa053dbd3af0bf5a8/chromecast/browser/cast_http_user_agent_settings.h
Comment 1 by xunji...@chromium.org
, May 9 2018