| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DNS_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_HOST_RESOLVER_H_ |
| 6 #define NET_DNS_HOST_RESOLVER_H_ | 6 #define NET_DNS_HOST_RESOLVER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 const BoundNetLog& net_log) = 0; | 156 const BoundNetLog& net_log) = 0; |
| 157 | 157 |
| 158 // Resolves the given hostname (or IP address literal) out of cache or HOSTS | 158 // Resolves the given hostname (or IP address literal) out of cache or HOSTS |
| 159 // file (if enabled) only. This is guaranteed to complete synchronously. | 159 // file (if enabled) only. This is guaranteed to complete synchronously. |
| 160 // This acts like |Resolve()| if the hostname is IP literal, or cached value | 160 // This acts like |Resolve()| if the hostname is IP literal, or cached value |
| 161 // or HOSTS entry exists. Otherwise, ERR_DNS_CACHE_MISS is returned. | 161 // or HOSTS entry exists. Otherwise, ERR_DNS_CACHE_MISS is returned. |
| 162 virtual int ResolveFromCache(const RequestInfo& info, | 162 virtual int ResolveFromCache(const RequestInfo& info, |
| 163 AddressList* addresses, | 163 AddressList* addresses, |
| 164 const BoundNetLog& net_log) = 0; | 164 const BoundNetLog& net_log) = 0; |
| 165 | 165 |
| 166 // Changes the priority of the specified request. |req| is the handle returned |
| 167 // by Resolve(). ChangeRequestPriority must NOT be called after the request's |
| 168 // completion callback has already run or the request was canceled. |
| 169 virtual void ChangeRequestPriority(RequestHandle req, |
| 170 RequestPriority priority); |
| 171 |
| 166 // Cancels the specified request. |req| is the handle returned by Resolve(). | 172 // Cancels the specified request. |req| is the handle returned by Resolve(). |
| 167 // After a request is canceled, its completion callback will not be called. | 173 // After a request is canceled, its completion callback will not be called. |
| 168 // CancelRequest must NOT be called after the request's completion callback | 174 // CancelRequest must NOT be called after the request's completion callback |
| 169 // has already run or the request was canceled. | 175 // has already run or the request was canceled. |
| 170 virtual void CancelRequest(RequestHandle req) = 0; | 176 virtual void CancelRequest(RequestHandle req) = 0; |
| 171 | 177 |
| 172 // Enable or disable the built-in asynchronous DnsClient. | 178 // Enable or disable the built-in asynchronous DnsClient. |
| 173 virtual void SetDnsClientEnabled(bool enabled); | 179 virtual void SetDnsClientEnabled(bool enabled); |
| 174 | 180 |
| 175 // Returns the HostResolverCache |this| uses, or NULL if there isn't one. | 181 // Returns the HostResolverCache |this| uses, or NULL if there isn't one. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 193 protected: | 199 protected: |
| 194 HostResolver(); | 200 HostResolver(); |
| 195 | 201 |
| 196 private: | 202 private: |
| 197 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 203 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
| 198 }; | 204 }; |
| 199 | 205 |
| 200 } // namespace net | 206 } // namespace net |
| 201 | 207 |
| 202 #endif // NET_DNS_HOST_RESOLVER_H_ | 208 #endif // NET_DNS_HOST_RESOLVER_H_ |
| OLD | NEW |