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

Side by Side Diff: net/dns/host_resolver_impl.h

Issue 19498003: [net/dns] Perform A/AAAA queries for AF_UNSPEC resolutions in parallel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DNS_HOST_RESOLVER_IMPL_H_ 5 #ifndef NET_DNS_HOST_RESOLVER_IMPL_H_
6 #define NET_DNS_HOST_RESOLVER_IMPL_H_ 6 #define NET_DNS_HOST_RESOLVER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // NetworkChangeNotifier::DNSObserver: 218 // NetworkChangeNotifier::DNSObserver:
219 virtual void OnDNSChanged() OVERRIDE; 219 virtual void OnDNSChanged() OVERRIDE;
220 220
221 // True if have a DnsClient with a valid DnsConfig. 221 // True if have a DnsClient with a valid DnsConfig.
222 bool HaveDnsConfig() const; 222 bool HaveDnsConfig() const;
223 223
224 // Called when a host name is successfully resolved and DnsTask was run on it 224 // Called when a host name is successfully resolved and DnsTask was run on it
225 // and resulted in |net_error|. 225 // and resulted in |net_error|.
226 void OnDnsTaskResolve(int net_error); 226 void OnDnsTaskResolve(int net_error);
227 227
228 // Allows the tests to catch slots leaking out of the dispatcher. 228 // Allows the tests to catch slots leaking out of the dispatcher. One
229 size_t num_running_jobs_for_tests() const { 229 // HostResolverImpl::Job could occupy multiple PrioritizedDispatcher job
230 // slots.
231 size_t num_running_dispatcher_jobs_for_tests() const {
230 return dispatcher_.num_running_jobs(); 232 return dispatcher_.num_running_jobs();
231 } 233 }
232 234
233 // Cache of host resolution results. 235 // Cache of host resolution results.
234 scoped_ptr<HostCache> cache_; 236 scoped_ptr<HostCache> cache_;
235 237
236 // Map from HostCache::Key to a Job. 238 // Map from HostCache::Key to a Job.
237 JobMap jobs_; 239 JobMap jobs_;
238 240
239 // Starts Jobs according to their priority and the configured limits. 241 // Starts Jobs according to their priority and the configured limits.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 279
278 // Allow fallback to ProcTask if DnsTask fails. 280 // Allow fallback to ProcTask if DnsTask fails.
279 bool fallback_to_proctask_; 281 bool fallback_to_proctask_;
280 282
281 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); 283 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl);
282 }; 284 };
283 285
284 } // namespace net 286 } // namespace net
285 287
286 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ 288 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698