| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_H_ | 5 #ifndef NET_BASE_HOST_RESOLVER_H_ |
| 6 #define NET_BASE_HOST_RESOLVER_H_ | 6 #define NET_BASE_HOST_RESOLVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Unregisters an observer previously added by AddObserver(). | 141 // Unregisters an observer previously added by AddObserver(). |
| 142 virtual void RemoveObserver(Observer* observer) = 0; | 142 virtual void RemoveObserver(Observer* observer) = 0; |
| 143 | 143 |
| 144 // Returns the host cache, or NULL if this implementation does not use | 144 // Returns the host cache, or NULL if this implementation does not use |
| 145 // a HostCache. | 145 // a HostCache. |
| 146 virtual HostCache* GetHostCache() = 0; | 146 virtual HostCache* GetHostCache() = 0; |
| 147 | 147 |
| 148 // TODO(eroman): temp hack for http://crbug.com/18373 | 148 // TODO(eroman): temp hack for http://crbug.com/18373 |
| 149 virtual void Shutdown() = 0; | 149 virtual void Shutdown() = 0; |
| 150 | 150 |
| 151 // Disables or enables support for IPv6 results. | 151 // Sets the default AddressFamily to use when requests have left it |
| 152 virtual void DisableIPv6(bool disable_ipv6) {} | 152 // unspecified. For example, this could be used to restrict resolution |
| 153 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to |
| 154 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. |
| 155 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} |
| 153 | 156 |
| 154 protected: | 157 protected: |
| 155 HostResolver() { } | 158 HostResolver() { } |
| 156 | 159 |
| 157 private: | 160 private: |
| 158 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 161 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
| 159 }; | 162 }; |
| 160 | 163 |
| 161 // This class represents the task of resolving a hostname (or IP address | 164 // This class represents the task of resolving a hostname (or IP address |
| 162 // literal) to an AddressList object. It wraps HostResolver to resolve only a | 165 // literal) to an AddressList object. It wraps HostResolver to resolve only a |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 }; | 199 }; |
| 197 | 200 |
| 198 // Creates a HostResolver implementation that queries the underlying system. | 201 // Creates a HostResolver implementation that queries the underlying system. |
| 199 // (Except if a unit-test has changed the global HostResolverProc using | 202 // (Except if a unit-test has changed the global HostResolverProc using |
| 200 // ScopedHostResolverProc to intercept requests to the system). | 203 // ScopedHostResolverProc to intercept requests to the system). |
| 201 HostResolver* CreateSystemHostResolver(); | 204 HostResolver* CreateSystemHostResolver(); |
| 202 | 205 |
| 203 } // namespace net | 206 } // namespace net |
| 204 | 207 |
| 205 #endif // NET_BASE_HOST_RESOLVER_H_ | 208 #endif // NET_BASE_HOST_RESOLVER_H_ |
| OLD | NEW |