Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: net/dns/host_resolver_impl.h

Issue 22909037: [net/dns] Reland of 218616 (Simultaneous A/AAAA queries). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix printing unsigned Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_test_util.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.h
===================================================================
--- net/dns/host_resolver_impl.h (revision 219192)
+++ net/dns/host_resolver_impl.h (working copy)
@@ -157,6 +157,10 @@
typedef std::map<Key, Job*> JobMap;
typedef ScopedVector<Request> RequestsList;
+ // Number of consecutive failures of DnsTask (with successful fallback to
+ // ProcTask) before the DnsClient is disabled until the next DNS change.
+ static const unsigned kMaximumDnsFailures;
+
// Helper used by |Resolve()| and |ResolveFromCache()|. Performs IP
// literal, cache and HOSTS lookup (if enabled), returns OK if successful,
// ERR_NAME_NOT_RESOLVED if either hostname is invalid or IP literal is
@@ -208,6 +212,11 @@
// requests. Might start new jobs.
void AbortAllInProgressJobs();
+ // Aborts all in progress DnsTasks. In-progress jobs will fall back to
+ // ProcTasks. Might start new jobs, if any jobs were taking up two dispatcher
+ // slots.
+ void AbortDnsTasks();
+
// Attempts to serve each Job in |jobs_| from the HOSTS file if we have
// a DnsClient with a valid DnsConfig.
void TryServingAllJobsFromHosts();
@@ -225,8 +234,10 @@
// and resulted in |net_error|.
void OnDnsTaskResolve(int net_error);
- // Allows the tests to catch slots leaking out of the dispatcher.
- size_t num_running_jobs_for_tests() const {
+ // Allows the tests to catch slots leaking out of the dispatcher. One
+ // HostResolverImpl::Job could occupy multiple PrioritizedDispatcher job
+ // slots.
+ size_t num_running_dispatcher_jobs_for_tests() const {
return dispatcher_.num_running_jobs();
}
« no previous file with comments | « net/dns/dns_test_util.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698