| 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_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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // unspecified. For example, this could be used to restrict resolution | 170 // unspecified. For example, this could be used to restrict resolution |
| 171 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to | 171 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to |
| 172 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. | 172 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. |
| 173 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} | 173 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} |
| 174 | 174 |
| 175 // Returns |this| cast to a HostResolverImpl*, or NULL if the subclass | 175 // Returns |this| cast to a HostResolverImpl*, or NULL if the subclass |
| 176 // is not compatible with HostResolverImpl. Used primarily to expose | 176 // is not compatible with HostResolverImpl. Used primarily to expose |
| 177 // additional functionality on the about:net-internals page. | 177 // additional functionality on the about:net-internals page. |
| 178 virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; } | 178 virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; } |
| 179 | 179 |
| 180 // Does additional cleanup prior to destruction. | |
| 181 virtual void Shutdown() {} | |
| 182 | |
| 183 protected: | 180 protected: |
| 184 friend class base::RefCounted<HostResolver>; | 181 friend class base::RefCounted<HostResolver>; |
| 185 | 182 |
| 186 HostResolver() { } | 183 HostResolver() { } |
| 187 | 184 |
| 188 // If any completion callbacks are pending when the resolver is destroyed, | 185 // If any completion callbacks are pending when the resolver is destroyed, |
| 189 // the host resolutions are cancelled, and the completion callbacks will not | 186 // the host resolutions are cancelled, and the completion callbacks will not |
| 190 // be called. | 187 // be called. |
| 191 virtual ~HostResolver() {} | 188 virtual ~HostResolver() {} |
| 192 | 189 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 }; | 233 }; |
| 237 | 234 |
| 238 // Creates a HostResolver implementation that queries the underlying system. | 235 // Creates a HostResolver implementation that queries the underlying system. |
| 239 // (Except if a unit-test has changed the global HostResolverProc using | 236 // (Except if a unit-test has changed the global HostResolverProc using |
| 240 // ScopedHostResolverProc to intercept requests to the system). | 237 // ScopedHostResolverProc to intercept requests to the system). |
| 241 HostResolver* CreateSystemHostResolver(); | 238 HostResolver* CreateSystemHostResolver(); |
| 242 | 239 |
| 243 } // namespace net | 240 } // namespace net |
| 244 | 241 |
| 245 #endif // NET_BASE_HOST_RESOLVER_H_ | 242 #endif // NET_BASE_HOST_RESOLVER_H_ |
| OLD | NEW |