| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PROC_H_ | 5 #ifndef NET_BASE_HOST_RESOLVER_PROC_H_ |
| 6 #define NET_BASE_HOST_RESOLVER_PROC_H_ | 6 #define NET_BASE_HOST_RESOLVER_PROC_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 explicit HostResolverProc(HostResolverProc* previous); | 26 explicit HostResolverProc(HostResolverProc* previous); |
| 27 | 27 |
| 28 // Resolves |host| to an address list, restricting the results to addresses | 28 // Resolves |host| to an address list, restricting the results to addresses |
| 29 // in |address_family|. If successful returns OK and fills |addrlist| with | 29 // in |address_family|. If successful returns OK and fills |addrlist| with |
| 30 // a list of socket addresses. Otherwise returns a network error code. | 30 // a list of socket addresses. Otherwise returns a network error code. |
| 31 virtual int Resolve(const std::string& host, | 31 virtual int Resolve(const std::string& host, |
| 32 AddressFamily address_family, | 32 AddressFamily address_family, |
| 33 AddressList* addrlist) = 0; | 33 AddressList* addrlist) = 0; |
| 34 | 34 |
| 35 // Test to see if IPv6 is supported. | |
| 36 static bool IPv6Supported(); | |
| 37 | |
| 38 protected: | 35 protected: |
| 39 friend class base::RefCountedThreadSafe<HostResolverProc>; | 36 friend class base::RefCountedThreadSafe<HostResolverProc>; |
| 40 | 37 |
| 41 virtual ~HostResolverProc() {} | 38 virtual ~HostResolverProc() {} |
| 42 | 39 |
| 43 // Asks the fallback procedure (if set) to do the resolve. | 40 // Asks the fallback procedure (if set) to do the resolve. |
| 44 int ResolveUsingPrevious(const std::string& host, | 41 int ResolveUsingPrevious(const std::string& host, |
| 45 AddressFamily address_family, | 42 AddressFamily address_family, |
| 46 AddressList* addrlist); | 43 AddressList* addrlist); |
| 47 | 44 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // (i.e. this calls out to getaddrinfo()). If successful returns OK and fills | 76 // (i.e. this calls out to getaddrinfo()). If successful returns OK and fills |
| 80 // |addrlist| with a list of socket addresses. Otherwise returns a | 77 // |addrlist| with a list of socket addresses. Otherwise returns a |
| 81 // network error code. | 78 // network error code. |
| 82 int SystemHostResolverProc(const std::string& host, | 79 int SystemHostResolverProc(const std::string& host, |
| 83 AddressFamily address_family, | 80 AddressFamily address_family, |
| 84 AddressList* addrlist); | 81 AddressList* addrlist); |
| 85 | 82 |
| 86 } // namespace net | 83 } // namespace net |
| 87 | 84 |
| 88 #endif // NET_BASE_HOST_RESOLVER_PROC_H_ | 85 #endif // NET_BASE_HOST_RESOLVER_PROC_H_ |
| OLD | NEW |