Allow to cancel a proxy resolution request.
After calling GetProxiesForUrl(), there was no way to prevent the proxy resolver from calling the passed callback once the response is ready. This implies that the object passed in the callback (normally as the "data" pointer) must be kept alive until the callback comes back. This patch allows to cancel an ongoing request and converts the passed callback to a base::Callback instead of using a raw pointer. (cherry picked from commit 3582194c) Bug: 34178297 Test: Added unittests. Change-Id: Ie544d0230fd0c2dc85c6b9eaca9b5b13702516fa Reviewed-on: https://chromium-review.googlesource.com/497490 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by:Dan Erat <derat@chromium.org> Reviewed-by:
Ben Chan <benchan@chromium.org> Reviewed-by:
Sen Jiang <senj@chromium.org>
Loading
Please sign in to comment