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