Commit c00ec56f authored by Alex Deymo's avatar Alex Deymo Committed by chrome-bot
Browse files

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: default avatarDan Erat <derat@chromium.org>
Reviewed-by: default avatarBen Chan <benchan@chromium.org>
Reviewed-by: default avatarSen Jiang <senj@chromium.org>
parent 70063d9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment