diff options
Diffstat (limited to 'net/base/host_resolver.h')
-rw-r--r-- | net/base/host_resolver.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h index 34c803f..6e2add7 100644 --- a/net/base/host_resolver.h +++ b/net/base/host_resolver.h @@ -106,13 +106,18 @@ class HostResolver { // Called at the start of HostResolver::Resolve(). |id| is a unique number // given to the request, so it can be matched up with a corresponding call - // to OnFinishResolutionWithStatus(). + // to OnFinishResolutionWithStatus() or OnCancelResolution(). virtual void OnStartResolution(int id, const RequestInfo& info) = 0; // Called on completion of request |id|. Note that if the request was - // cancelled, OnFinishResolutionWithStatus() will not be called. + // cancelled, OnCancelResolution() will be called instead. virtual void OnFinishResolutionWithStatus(int id, bool was_resolved, const RequestInfo& info) = 0; + + // Called when request |id| has been cancelled. A request is "cancelled" + // if either the HostResolver is destroyed while a resolution is in + // progress, or HostResolver::CancelRequest() is called. + virtual void OnCancelResolution(int id, const RequestInfo& info) = 0; }; // Creates a HostResolver that caches up to |max_cache_entries| for @@ -175,11 +180,11 @@ class HostResolver { // Callback for when |job| has completed with |error| and |addrlist|. void OnJobComplete(Job* job, int error, const AddressList& addrlist); - // Notify all obsevers of the start of a resolve request. + // Notify all observers of the start of a resolve request. void NotifyObserversStartRequest(int request_id, const RequestInfo& info); - // Notify all obsevers of the completion of a resolve request. + // Notify all observers of the completion of a resolve request. void NotifyObserversFinishRequest(int request_id, const RequestInfo& info, int error); |