| 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 virtual void CancelRequest(RequestHandle req) = 0; | 141 virtual void CancelRequest(RequestHandle req) = 0; |
| 142 | 142 |
| 143 // Adds an observer to this resolver. The observer will be notified of the | 143 // Adds an observer to this resolver. The observer will be notified of the |
| 144 // start and completion of all requests (excluding cancellation). |observer| | 144 // start and completion of all requests (excluding cancellation). |observer| |
| 145 // must remain valid for the duration of this HostResolver's lifetime. | 145 // must remain valid for the duration of this HostResolver's lifetime. |
| 146 virtual void AddObserver(Observer* observer) = 0; | 146 virtual void AddObserver(Observer* observer) = 0; |
| 147 | 147 |
| 148 // Unregisters an observer previously added by AddObserver(). | 148 // Unregisters an observer previously added by AddObserver(). |
| 149 virtual void RemoveObserver(Observer* observer) = 0; | 149 virtual void RemoveObserver(Observer* observer) = 0; |
| 150 | 150 |
| 151 // TODO(eroman): temp hack for http://crbug.com/18373 | |
| 152 virtual void Shutdown() = 0; | |
| 153 | |
| 154 // Sets the default AddressFamily to use when requests have left it | 151 // Sets the default AddressFamily to use when requests have left it |
| 155 // unspecified. For example, this could be used to restrict resolution | 152 // unspecified. For example, this could be used to restrict resolution |
| 156 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to | 153 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to |
| 157 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. | 154 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. |
| 158 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} | 155 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} |
| 159 | 156 |
| 160 // Returns true if this HostResolver is an instance of HostResolverImpl. | 157 // Returns true if this HostResolver is an instance of HostResolverImpl. |
| 161 // Used primarily to expose additional functionality on the | 158 // Used primarily to expose additional functionality on the |
| 162 // about:net-internals page. | 159 // about:net-internals page. |
| 163 virtual bool IsHostResolverImpl() { return false; } | 160 virtual bool IsHostResolverImpl() { return false; } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // (Except if a unit-test has changed the global HostResolverProc using | 218 // (Except if a unit-test has changed the global HostResolverProc using |
| 222 // ScopedHostResolverProc to intercept requests to the system). | 219 // ScopedHostResolverProc to intercept requests to the system). |
| 223 // |network_change_notifier| must outlive HostResolver. It can optionally be | 220 // |network_change_notifier| must outlive HostResolver. It can optionally be |
| 224 // NULL, in which case HostResolver will not respond to network changes. | 221 // NULL, in which case HostResolver will not respond to network changes. |
| 225 HostResolver* CreateSystemHostResolver( | 222 HostResolver* CreateSystemHostResolver( |
| 226 NetworkChangeNotifier* network_change_notifier); | 223 NetworkChangeNotifier* network_change_notifier); |
| 227 | 224 |
| 228 } // namespace net | 225 } // namespace net |
| 229 | 226 |
| 230 #endif // NET_BASE_HOST_RESOLVER_H_ | 227 #endif // NET_BASE_HOST_RESOLVER_H_ |
| OLD | NEW |