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_DNSRR_RESOLVER_H_ | 5 #ifndef NET_BASE_DNSRR_RESOLVER_H_ |
6 #define NET_BASE_DNSRR_RESOLVER_H_ | 6 #define NET_BASE_DNSRR_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 // RRResponse contains the result of a successful request for a resource record. | 25 // RRResponse contains the result of a successful request for a resource record. |
26 struct NET_EXPORT_PRIVATE RRResponse { | 26 struct NET_EXPORT_PRIVATE RRResponse { |
27 RRResponse(); | 27 RRResponse(); |
28 ~RRResponse(); | 28 ~RRResponse(); |
29 | 29 |
30 // HasExpired returns true if |fetch_time| + |ttl| is less than | 30 // HasExpired returns true if |fetch_time| + |ttl| is less than |
31 // |current_time|. | 31 // |current_time|. |
32 bool HasExpired(base::Time current_time) const; | 32 bool HasExpired(base::Time current_time) const; |
33 | 33 |
| 34 #if defined(OS_POSIX) && !defined(OS_ANDROID) |
34 // For testing only | 35 // For testing only |
35 bool ParseFromResponse(const uint8* data, unsigned len, | 36 bool ParseFromResponse(const uint8* data, unsigned len, |
36 uint16 rrtype_requested); | 37 uint16 rrtype_requested); |
| 38 #endif |
37 | 39 |
38 // name contains the canonical name of the resulting domain. If the queried | 40 // name contains the canonical name of the resulting domain. If the queried |
39 // name was a CNAME then this can differ. | 41 // name was a CNAME then this can differ. |
40 std::string name; | 42 std::string name; |
41 // ttl contains the TTL of the resource records. | 43 // ttl contains the TTL of the resource records. |
42 uint32 ttl; | 44 uint32 ttl; |
43 // dnssec is true if the response was DNSSEC validated. | 45 // dnssec is true if the response was DNSSEC validated. |
44 bool dnssec; | 46 bool dnssec; |
45 std::vector<std::string> rrdatas; | 47 std::vector<std::string> rrdatas; |
46 // sigs contains the RRSIG records returned. | 48 // sigs contains the RRSIG records returned. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 uint64 inflight_joins_; | 131 uint64 inflight_joins_; |
130 | 132 |
131 bool in_destructor_; | 133 bool in_destructor_; |
132 | 134 |
133 DISALLOW_COPY_AND_ASSIGN(DnsRRResolver); | 135 DISALLOW_COPY_AND_ASSIGN(DnsRRResolver); |
134 }; | 136 }; |
135 | 137 |
136 } // namespace net | 138 } // namespace net |
137 | 139 |
138 #endif // NET_BASE_DNSRR_RESOLVER_H_ | 140 #endif // NET_BASE_DNSRR_RESOLVER_H_ |
OLD | NEW |