Convert ProxyResolutionServiceProvider to use Network Service.

https://chromium-review.googlesource.com/c/chromium/src/+/1419264
This commit is contained in:
deepak1556 2019-01-24 20:27:08 +05:30
parent 035eee5c03
commit 86a94126fb
2 changed files with 3 additions and 1 deletions

View file

@ -52,7 +52,7 @@ void ResolveProxyHelper::StartPendingRequest() {
binding_.Bind(mojo::MakeRequest(&proxy_lookup_client));
binding_.set_connection_error_handler(
base::BindOnce(&ResolveProxyHelper::OnProxyLookupComplete,
base::Unretained(this), base::nullopt));
base::Unretained(this), net::ERR_ABORTED, base::nullopt));
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
->GetNetworkContext()
->LookUpProxyForURL(pending_requests_.front().url,
@ -60,6 +60,7 @@ void ResolveProxyHelper::StartPendingRequest() {
}
void ResolveProxyHelper::OnProxyLookupComplete(
int32_t net_error,
const base::Optional<net::ProxyInfo>& proxy_info) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!pending_requests_.empty());

View file

@ -54,6 +54,7 @@ class ResolveProxyHelper
// network::mojom::ProxyLookupClient implementation.
void OnProxyLookupComplete(
int32_t net_error,
const base::Optional<net::ProxyInfo>& proxy_info) override;
// Self-reference. Owned as long as there's an outstanding proxy lookup.