-
Antonio Gomes authored
URLFetcher et al will stop working in the browser process with advent of Network Service, and SimpleURLLoader is the replacement API for most clients. CL migrates TranslateURLFetcher to the new API. Additionally, various unittests were also updated to use the new TestURLLoaderFactory and EmbeddedTestServer machinery. As a bonus, the CL allows us to get of URLRequestContextGetter references throughout the TranslateURLFetcher path, including TranslateLanguageList, TranslateScript, etc. Since TestURLFetcherFactory allowed us to retrieve the actual URLFetcher object (given an known 'id'), and SimpleURLLoader does not, some helper methods were introduced, in order to verify the state of the objects at a certain moment of the execution flow, eg LanguageFetchURLForTesting and HasOngoingLanguageListLoadingForTesting. Last, in a follow up CL, I will change the nomenclature used throughout these files, from "fetcher" to "loader". Bug: 773295,844971 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Ica404dded4fab79a0035df825f12d2b1bb06329e Reviewed-on: https://chromium-review.googlesource.com/1085947Reviewed-by:
Matt Menke <mmenke@chromium.org> Reviewed-by:
Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by:
Eugene But <eugenebut@chromium.org> Reviewed-by:
David Roger <droger@chromium.org> Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Cr-Commit-Position: refs/heads/master@{#567002}
61a972c3