OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SINGLE_REQUEST_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
6 #define NET_BASE_SINGLE_REQUEST_HOST_RESOLVER_H_ | 6 #define NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
7 | 7 |
8 #include "net/base/host_resolver.h" | 8 #include "net/dns/host_resolver.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
12 // This class represents the task of resolving a hostname (or IP address | 12 // This class represents the task of resolving a hostname (or IP address |
13 // literal) to an AddressList object. It wraps HostResolver to resolve only a | 13 // literal) to an AddressList object. It wraps HostResolver to resolve only a |
14 // single hostname at a time and cancels this request when going out of scope. | 14 // single hostname at a time and cancels this request when going out of scope. |
15 class NET_EXPORT SingleRequestHostResolver { | 15 class NET_EXPORT SingleRequestHostResolver { |
16 public: | 16 public: |
17 // |resolver| must remain valid for the lifetime of |this|. | 17 // |resolver| must remain valid for the lifetime of |this|. |
18 explicit SingleRequestHostResolver(HostResolver* resolver); | 18 explicit SingleRequestHostResolver(HostResolver* resolver); |
(...skipping 27 matching lines...) Expand all Loading... |
46 CompletionCallback cur_request_callback_; | 46 CompletionCallback cur_request_callback_; |
47 | 47 |
48 // Completion callback for when request to |resolver_| completes. | 48 // Completion callback for when request to |resolver_| completes. |
49 CompletionCallback callback_; | 49 CompletionCallback callback_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); | 51 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace net | 54 } // namespace net |
55 | 55 |
56 #endif // NET_BASE_SINGLE_REQUEST_HOST_RESOLVER_H_ | 56 #endif // NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
OLD | NEW |