summaryrefslogtreecommitdiffstats
path: root/net/base/dnsrr_resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/dnsrr_resolver.h')
-rw-r--r--net/base/dnsrr_resolver.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/net/base/dnsrr_resolver.h b/net/base/dnsrr_resolver.h
index 28bceaa..6dfea2f 100644
--- a/net/base/dnsrr_resolver.h
+++ b/net/base/dnsrr_resolver.h
@@ -15,24 +15,6 @@
namespace net {
-// RRResponse contains the result of a successful request for a resource record.
-struct RRResponse {
- // name contains the canonical name of the resulting domain. If the queried
- // name was a CNAME then this can differ.
- std::string name;
- // ttl contains the TTL of the resource records.
- uint32 ttl;
- // dnssec is true if the response was DNSSEC validated.
- bool dnssec;
- std::vector<std::string> rrdatas;
- // sigs contains the RRSIG records returned.
- std::vector<std::string> signatures;
-
- // For testing only
- bool ParseFromResponse(const uint8* data, unsigned len,
- uint16 rrtype_requested);
-};
-
// DnsRRResolver resolves arbitary DNS resource record types. It should not be
// confused with HostResolver and should not be used to resolve A/AAAA records.
//
@@ -43,19 +25,37 @@ struct RRResponse {
// the name is a fully qualified DNS domain.
class DnsRRResolver {
public:
+ // Response contains the details of a successful request.
+ struct Response {
+ // name contains the canonical name of the resulting domain. If the queried
+ // name was a CNAME then this can differ.
+ std::string name;
+ // ttl contains the TTL of the resource records.
+ uint32 ttl;
+ // dnssec is true if the response was DNSSEC validated.
+ bool dnssec;
+ std::vector<std::string> rrdatas;
+ // sigs contains the RRSIG records returned.
+ std::vector<std::string> signatures;
+
+ // For testing only
+ bool ParseFromResponse(const uint8* data, unsigned len,
+ uint16 rrtype_requested);
+ };
+
enum {
// Try harder to get a DNSSEC signed response. This doesn't mean that the
- // RRResponse will always have the dnssec bit set.
+ // Response will always have the dnssec bit set.
FLAG_WANT_DNSSEC = 1,
};
// Resolve starts the resolution process. When complete, |callback| is called
// with a result. If the result is |OK| then |response| is filled with the
- // result of the resolution. Note the |callback| is called on the current
- // MessageLoop.
+ // result of the resolution. Note the |callback| is called from a random
+ // worker thread.
static bool Resolve(const std::string& name, uint16 rrtype,
uint16 flags, CompletionCallback* callback,
- RRResponse* response);
+ Response* response);
private:
DISALLOW_COPY_AND_ASSIGN(DnsRRResolver);