| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} | 163 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} |
| 164 | 164 |
| 165 // Returns |this| cast to a HostResolverImpl*, or NULL if the subclass | 165 // Returns |this| cast to a HostResolverImpl*, or NULL if the subclass |
| 166 // is not compatible with HostResolverImpl. Used primarily to expose | 166 // is not compatible with HostResolverImpl. Used primarily to expose |
| 167 // additional functionality on the about:net-internals page. | 167 // additional functionality on the about:net-internals page. |
| 168 virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; } | 168 virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; } |
| 169 | 169 |
| 170 protected: | 170 protected: |
| 171 friend class base::RefCountedThreadSafe<HostResolver>; | 171 friend class base::RefCountedThreadSafe<HostResolver>; |
| 172 | 172 |
| 173 HostResolver() { } | 173 HostResolver() {} |
| 174 | 174 |
| 175 // If any completion callbacks are pending when the resolver is destroyed, | 175 // If any completion callbacks are pending when the resolver is destroyed, |
| 176 // the host resolutions are cancelled, and the completion callbacks will not | 176 // the host resolutions are cancelled, and the completion callbacks will not |
| 177 // be called. | 177 // be called. |
| 178 virtual ~HostResolver() {} | 178 virtual ~HostResolver() {} |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 181 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
| 182 }; | 182 }; |
| 183 | 183 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // (Except if a unit-test has changed the global HostResolverProc using | 226 // (Except if a unit-test has changed the global HostResolverProc using |
| 227 // ScopedHostResolverProc to intercept requests to the system). | 227 // ScopedHostResolverProc to intercept requests to the system). |
| 228 // |network_change_notifier| must outlive HostResolver. It can optionally be | 228 // |network_change_notifier| must outlive HostResolver. It can optionally be |
| 229 // NULL, in which case HostResolver will not respond to network changes. | 229 // NULL, in which case HostResolver will not respond to network changes. |
| 230 HostResolver* CreateSystemHostResolver( | 230 HostResolver* CreateSystemHostResolver( |
| 231 NetworkChangeNotifier* network_change_notifier); | 231 NetworkChangeNotifier* network_change_notifier); |
| 232 | 232 |
| 233 } // namespace net | 233 } // namespace net |
| 234 | 234 |
| 235 #endif // NET_BASE_HOST_RESOLVER_H_ | 235 #endif // NET_BASE_HOST_RESOLVER_H_ |
| OLD | NEW |