diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 14:42:34 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 14:42:34 +0000 |
commit | 9bc44f8b2f4cba18c8a86a259bfba37d3f429d23 (patch) | |
tree | 2823b9ca3907b299a3d08e0409b36d2235086b38 /net/base/dnsrr_resolver.h | |
parent | ab4b95dd02b93633763fad49bd53f730a40a3c72 (diff) | |
download | chromium_src-9bc44f8b2f4cba18c8a86a259bfba37d3f429d23.zip chromium_src-9bc44f8b2f4cba18c8a86a259bfba37d3f429d23.tar.gz chromium_src-9bc44f8b2f4cba18c8a86a259bfba37d3f429d23.tar.bz2 |
Revert "DnsRRResolver: hoist inner class and callback on MessageLoop."
(Everything goes to hell when the try servers don't work.)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dnsrr_resolver.h')
-rw-r--r-- | net/base/dnsrr_resolver.h | 44 |
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); |