OLD | NEW |
---|---|
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 // NetworkChangeNotifier::DNSObserver: | 216 // NetworkChangeNotifier::DNSObserver: |
217 virtual void OnDNSChanged() OVERRIDE; | 217 virtual void OnDNSChanged() OVERRIDE; |
218 | 218 |
219 // True if have a DnsClient with a valid DnsConfig. | 219 // True if have a DnsClient with a valid DnsConfig. |
220 bool HaveDnsConfig() const; | 220 bool HaveDnsConfig() const; |
221 | 221 |
222 // Called when a host name is successfully resolved and DnsTask was run on it | 222 // Called when a host name is successfully resolved and DnsTask was run on it |
223 // and resulted in |net_error|. | 223 // and resulted in |net_error|. |
224 void OnDnsTaskResolve(int net_error); | 224 void OnDnsTaskResolve(int net_error); |
225 | 225 |
226 // Allows the tests to catch slots leaking out of the dispatcher. | 226 // Allows the tests to catch slots leaking out of the dispatcher. One |
227 size_t num_running_jobs_for_tests() const { | 227 // HostResolverImpl::Job moccupy multiple PrioritizedDispatcher job slots. |
szym
2013/08/06 20:35:31
moccupy => could occupy
Probably OK to skip HostRe
mmenke
2013/08/19 17:31:11
Done.
| |
228 size_t num_running_dispatcher_jobs_for_tests() const { | |
228 return dispatcher_.num_running_jobs(); | 229 return dispatcher_.num_running_jobs(); |
229 } | 230 } |
230 | 231 |
231 // Cache of host resolution results. | 232 // Cache of host resolution results. |
232 scoped_ptr<HostCache> cache_; | 233 scoped_ptr<HostCache> cache_; |
233 | 234 |
234 // Map from HostCache::Key to a Job. | 235 // Map from HostCache::Key to a Job. |
235 JobMap jobs_; | 236 JobMap jobs_; |
236 | 237 |
237 // Starts Jobs according to their priority and the configured limits. | 238 // Starts Jobs according to their priority and the configured limits. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 | 276 |
276 // Allow fallback to ProcTask if DnsTask fails. | 277 // Allow fallback to ProcTask if DnsTask fails. |
277 bool fallback_to_proctask_; | 278 bool fallback_to_proctask_; |
278 | 279 |
279 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); | 280 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); |
280 }; | 281 }; |
281 | 282 |
282 } // namespace net | 283 } // namespace net |
283 | 284 |
284 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ | 285 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ |
OLD | NEW |