| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 // Opaque type used to cancel a request. | 115 // Opaque type used to cancel a request. |
| 116 typedef void* RequestHandle; | 116 typedef void* RequestHandle; |
| 117 | 117 |
| 118 // Set Options.max_concurrent_resolves to this to select a default level | 118 // Set Options.max_concurrent_resolves to this to select a default level |
| 119 // of concurrency. | 119 // of concurrency. |
| 120 static const size_t kDefaultParallelism = 0; | 120 static const size_t kDefaultParallelism = 0; |
| 121 | 121 |
| 122 // Set Options.max_retry_attempts to this to select a default retry value. | 122 // Set Options.max_retry_attempts to this to select a default retry value. |
| 123 static const size_t kDefaultRetryAttempts = -1; | 123 static const size_t kDefaultRetryAttempts = static_cast<size_t>(-1); |
| 124 | 124 |
| 125 // If any completion callbacks are pending when the resolver is destroyed, | 125 // If any completion callbacks are pending when the resolver is destroyed, |
| 126 // the host resolutions are cancelled, and the completion callbacks will not | 126 // the host resolutions are cancelled, and the completion callbacks will not |
| 127 // be called. | 127 // be called. |
| 128 virtual ~HostResolver(); | 128 virtual ~HostResolver(); |
| 129 | 129 |
| 130 // Resolves the given hostname (or IP address literal), filling out the | 130 // Resolves the given hostname (or IP address literal), filling out the |
| 131 // |addresses| object upon success. The |info.port| parameter will be set as | 131 // |addresses| object upon success. The |info.port| parameter will be set as |
| 132 // the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if | 132 // the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if |
| 133 // successful or an error code upon failure. Returns | 133 // successful or an error code upon failure. Returns |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 protected: | 198 protected: |
| 199 HostResolver(); | 199 HostResolver(); |
| 200 | 200 |
| 201 private: | 201 private: |
| 202 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 202 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 } // namespace net | 205 } // namespace net |
| 206 | 206 |
| 207 #endif // NET_DNS_HOST_RESOLVER_H_ | 207 #endif // NET_DNS_HOST_RESOLVER_H_ |
| OLD | NEW |