summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_impl.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 16:52:15 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 16:52:15 +0000
commitcfefb8611bb217d2e4d8af84640a91d501616e60 (patch)
treec72fbd120f4e33a9674b1e3575e587ea89ef47bd /net/base/host_resolver_impl.h
parent80f6e421502c5b24d306550480b9b0f29e1b26f6 (diff)
downloadchromium_src-cfefb8611bb217d2e4d8af84640a91d501616e60.zip
chromium_src-cfefb8611bb217d2e4d8af84640a91d501616e60.tar.gz
chromium_src-cfefb8611bb217d2e4d8af84640a91d501616e60.tar.bz2
Abort host resolution requests with ERR_ABORTED on ip address change.
BUG=53386 Review URL: http://codereview.chromium.org/3277002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl.h')
-rw-r--r--net/base/host_resolver_impl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index a06a478..58d8598 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -156,6 +156,14 @@ class HostResolverImpl : public HostResolver,
void OnJobComplete(Job* job, int net_error, int os_error,
const AddressList& addrlist);
+ // Aborts |job|. Same as OnJobComplete() except does not remove |job|
+ // from |jobs_| and does not cache the result (ERR_ABORTED).
+ void AbortJob(Job* job);
+
+ // Used by both OnJobComplete() and AbortJob();
+ void OnJobCompleteInternal(Job* job, int net_error, int os_error,
+ const AddressList& addrlist);
+
// Called when a request has just been started.
void OnStartRequest(const BoundNetLog& source_net_log,
const BoundNetLog& request_net_log,
@@ -211,6 +219,12 @@ class HostResolverImpl : public HostResolver,
// Adds a pending request |req| to |pool|.
int EnqueueRequest(JobPool* pool, Request* req);
+ // Cancels all jobs.
+ void CancelAllJobs();
+
+ // Aborts all jobs.
+ void AbortAllJobs();
+
// Cache of host resolution results.
scoped_ptr<HostCache> cache_;