OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "net/base/host_resolver.h" | 5 #include "net/base/host_resolver.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 HostResolver::RequestInfo::RequestInfo(const HostPortPair& host_port_pair) | 13 HostResolver::RequestInfo::RequestInfo(const HostPortPair& host_port_pair) |
14 : host_port_pair_(host_port_pair), | 14 : host_port_pair_(host_port_pair), |
15 address_family_(ADDRESS_FAMILY_UNSPECIFIED), | 15 address_family_(ADDRESS_FAMILY_UNSPECIFIED), |
16 host_resolver_flags_(0), | 16 host_resolver_flags_(0), |
17 allow_cached_response_(true), | 17 allow_cached_response_(true), |
18 is_speculative_(false), | 18 is_speculative_(false), |
19 priority_(MEDIUM) { | 19 priority_(MEDIUM) { |
20 } | 20 } |
21 | 21 |
22 HostResolver::HostResolver() { | 22 HostResolver::HostResolver() { |
23 } | 23 } |
24 | 24 |
25 HostResolver::~HostResolver() { | 25 HostResolver::~HostResolver() { |
26 } | 26 } |
27 | 27 |
| 28 AddressFamily HostResolver::GetDefaultAddressFamily() const { |
| 29 return net::ADDRESS_FAMILY_UNSPECIFIED; |
| 30 } |
| 31 |
| 32 HostResolverImpl* HostResolver::GetAsHostResolverImpl() { |
| 33 return NULL; |
| 34 } |
| 35 |
28 SingleRequestHostResolver::SingleRequestHostResolver(HostResolver* resolver) | 36 SingleRequestHostResolver::SingleRequestHostResolver(HostResolver* resolver) |
29 : resolver_(resolver), | 37 : resolver_(resolver), |
30 cur_request_(NULL), | 38 cur_request_(NULL), |
31 cur_request_callback_(NULL), | 39 cur_request_callback_(NULL), |
32 ALLOW_THIS_IN_INITIALIZER_LIST( | 40 ALLOW_THIS_IN_INITIALIZER_LIST( |
33 callback_(this, &SingleRequestHostResolver::OnResolveCompletion)) { | 41 callback_(this, &SingleRequestHostResolver::OnResolveCompletion)) { |
34 DCHECK(resolver_ != NULL); | 42 DCHECK(resolver_ != NULL); |
35 } | 43 } |
36 | 44 |
37 SingleRequestHostResolver::~SingleRequestHostResolver() { | 45 SingleRequestHostResolver::~SingleRequestHostResolver() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 84 |
77 // Clear the outstanding request information. | 85 // Clear the outstanding request information. |
78 cur_request_ = NULL; | 86 cur_request_ = NULL; |
79 cur_request_callback_ = NULL; | 87 cur_request_callback_ = NULL; |
80 | 88 |
81 // Call the user's original callback. | 89 // Call the user's original callback. |
82 callback->Run(result); | 90 callback->Run(result); |
83 } | 91 } |
84 | 92 |
85 } // namespace net | 93 } // namespace net |
OLD | NEW |