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> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 | 12 |
10 #include "base/basictypes.h" | 13 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
12 #include "net/base/address_family.h" | 15 #include "net/base/address_family.h" |
13 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
14 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
15 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
16 #include "net/base/prioritized_dispatcher.h" | 19 #include "net/base/prioritized_dispatcher.h" |
17 #include "net/base/request_priority.h" | 20 #include "net/base/request_priority.h" |
18 | 21 |
19 namespace base { | 22 namespace base { |
20 class Value; | 23 class Value; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // required; the rest are optional (and have reasonable defaults). | 63 // required; the rest are optional (and have reasonable defaults). |
61 class NET_EXPORT RequestInfo { | 64 class NET_EXPORT RequestInfo { |
62 public: | 65 public: |
63 explicit RequestInfo(const HostPortPair& host_port_pair); | 66 explicit RequestInfo(const HostPortPair& host_port_pair); |
64 | 67 |
65 const HostPortPair& host_port_pair() const { return host_port_pair_; } | 68 const HostPortPair& host_port_pair() const { return host_port_pair_; } |
66 void set_host_port_pair(const HostPortPair& host_port_pair) { | 69 void set_host_port_pair(const HostPortPair& host_port_pair) { |
67 host_port_pair_ = host_port_pair; | 70 host_port_pair_ = host_port_pair; |
68 } | 71 } |
69 | 72 |
70 uint16 port() const { return host_port_pair_.port(); } | 73 uint16_t port() const { return host_port_pair_.port(); } |
71 const std::string& hostname() const { return host_port_pair_.host(); } | 74 const std::string& hostname() const { return host_port_pair_.host(); } |
72 | 75 |
73 AddressFamily address_family() const { return address_family_; } | 76 AddressFamily address_family() const { return address_family_; } |
74 void set_address_family(AddressFamily address_family) { | 77 void set_address_family(AddressFamily address_family) { |
75 address_family_ = address_family; | 78 address_family_ = address_family; |
76 } | 79 } |
77 | 80 |
78 HostResolverFlags host_resolver_flags() const { | 81 HostResolverFlags host_resolver_flags() const { |
79 return host_resolver_flags_; | 82 return host_resolver_flags_; |
80 } | 83 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 protected: | 194 protected: |
192 HostResolver(); | 195 HostResolver(); |
193 | 196 |
194 private: | 197 private: |
195 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 198 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
196 }; | 199 }; |
197 | 200 |
198 } // namespace net | 201 } // namespace net |
199 | 202 |
200 #endif // NET_DNS_HOST_RESOLVER_H_ | 203 #endif // NET_DNS_HOST_RESOLVER_H_ |
OLD | NEW |