| 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_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
| 6 #define NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ | 6 #define NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // Callback for when the request to |resolver_| completes, so we dispatch | 45 // Callback for when the request to |resolver_| completes, so we dispatch |
| 46 // to the user's callback. | 46 // to the user's callback. |
| 47 void OnResolveCompletion(int result); | 47 void OnResolveCompletion(int result); |
| 48 | 48 |
| 49 // The actual host resolver that will handle the request. | 49 // The actual host resolver that will handle the request. |
| 50 HostResolver* const resolver_; | 50 HostResolver* const resolver_; |
| 51 | 51 |
| 52 // The current request (if any). | 52 // The current request (if any). |
| 53 HostResolver::RequestHandle cur_request_; | 53 std::unique_ptr<HostResolver::Request> cur_request_; |
| 54 CompletionCallback cur_request_callback_; | 54 CompletionCallback cur_request_callback_; |
| 55 | 55 |
| 56 // Completion callback for when request to |resolver_| completes. | 56 // Completion callback for when request to |resolver_| completes. |
| 57 CompletionCallback callback_; | 57 CompletionCallback callback_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); | 59 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace net | 62 } // namespace net |
| 63 | 63 |
| 64 #endif // NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ | 64 #endif // NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ |
| OLD | NEW |