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_BASE_HOST_RESOLVER_IMPL_H_ | 5 #ifndef NET_BASE_HOST_RESOLVER_IMPL_H_ |
6 #define NET_BASE_HOST_RESOLVER_IMPL_H_ | 6 #define NET_BASE_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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Callback from IPv6 probe activity. | 193 // Callback from IPv6 probe activity. |
194 void IPv6ProbeSetDefaultAddressFamily(AddressFamily address_family); | 194 void IPv6ProbeSetDefaultAddressFamily(AddressFamily address_family); |
195 | 195 |
196 // Returns the (hostname, address_family) key to use for |info|, choosing an | 196 // Returns the (hostname, address_family) key to use for |info|, choosing an |
197 // "effective" address family by inheriting the resolver's default address | 197 // "effective" address family by inheriting the resolver's default address |
198 // family when the request leaves it unspecified. | 198 // family when the request leaves it unspecified. |
199 Key GetEffectiveKeyForRequest(const RequestInfo& info) const; | 199 Key GetEffectiveKeyForRequest(const RequestInfo& info) const; |
200 | 200 |
201 // Records the result in cache if cache is present. | 201 // Records the result in cache if cache is present. |
202 void CacheResult(const Key& key, | 202 void CacheResult(const Key& key, |
203 int net_error, | 203 const HostCache::Entry& entry, |
204 const AddressList& addr_list, | |
205 base::TimeDelta ttl); | 204 base::TimeDelta ttl); |
206 | 205 |
207 // Removes |job| from |jobs_|, only if it exists. | 206 // Removes |job| from |jobs_|, only if it exists. |
208 void RemoveJob(Job* job); | 207 void RemoveJob(Job* job); |
209 | 208 |
210 // Aborts all in progress jobs and notifies their requests. | 209 // Aborts all in progress jobs and notifies their requests. |
211 // Might start new jobs. | 210 // Might start new jobs. |
212 void AbortAllInProgressJobs(); | 211 void AbortAllInProgressJobs(); |
213 | 212 |
214 // Attempts to serve each Job in |jobs_| from the HOSTS file if we have | 213 // Attempts to serve each Job in |jobs_| from the HOSTS file if we have |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 HostResolverFlags additional_resolver_flags_; | 266 HostResolverFlags additional_resolver_flags_; |
268 | 267 |
269 NetLog* net_log_; | 268 NetLog* net_log_; |
270 | 269 |
271 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); | 270 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); |
272 }; | 271 }; |
273 | 272 |
274 } // namespace net | 273 } // namespace net |
275 | 274 |
276 #endif // NET_BASE_HOST_RESOLVER_IMPL_H_ | 275 #endif // NET_BASE_HOST_RESOLVER_IMPL_H_ |
OLD | NEW |