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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 // Attempts to serve each Job in |jobs_| from the HOSTS file if we have | 222 // Attempts to serve each Job in |jobs_| from the HOSTS file if we have |
223 // a DnsClient with a valid DnsConfig. | 223 // a DnsClient with a valid DnsConfig. |
224 void TryServingAllJobsFromHosts(); | 224 void TryServingAllJobsFromHosts(); |
225 | 225 |
226 // NetworkChangeNotifier::IPAddressObserver: | 226 // NetworkChangeNotifier::IPAddressObserver: |
227 void OnIPAddressChanged() override; | 227 void OnIPAddressChanged() override; |
228 | 228 |
229 // NetworkChangeNotifier::DNSObserver: | 229 // NetworkChangeNotifier::DNSObserver: |
230 void OnDNSChanged() override; | 230 void OnDNSChanged() override; |
| 231 void OnInitialDNSConfigRead() override; |
| 232 |
| 233 void UpdateDNSConfig(bool config_changed); |
231 | 234 |
232 // True if have a DnsClient with a valid DnsConfig. | 235 // True if have a DnsClient with a valid DnsConfig. |
233 bool HaveDnsConfig() const; | 236 bool HaveDnsConfig() const; |
234 | 237 |
235 // Called when a host name is successfully resolved and DnsTask was run on it | 238 // Called when a host name is successfully resolved and DnsTask was run on it |
236 // and resulted in |net_error|. | 239 // and resulted in |net_error|. |
237 void OnDnsTaskResolve(int net_error); | 240 void OnDnsTaskResolve(int net_error); |
238 | 241 |
239 // Allows the tests to catch slots leaking out of the dispatcher. One | 242 // Allows the tests to catch slots leaking out of the dispatcher. One |
240 // HostResolverImpl::Job could occupy multiple PrioritizedDispatcher job | 243 // HostResolverImpl::Job could occupy multiple PrioritizedDispatcher job |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 base::WeakPtrFactory<HostResolverImpl> weak_ptr_factory_; | 297 base::WeakPtrFactory<HostResolverImpl> weak_ptr_factory_; |
295 | 298 |
296 base::WeakPtrFactory<HostResolverImpl> probe_weak_ptr_factory_; | 299 base::WeakPtrFactory<HostResolverImpl> probe_weak_ptr_factory_; |
297 | 300 |
298 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); | 301 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); |
299 }; | 302 }; |
300 | 303 |
301 } // namespace net | 304 } // namespace net |
302 | 305 |
303 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ | 306 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ |
OLD | NEW |