| Index: net/dns/dns_response.h
|
| diff --git a/net/dns/dns_response.h b/net/dns/dns_response.h
|
| index cb61e1fb1efbbb2c2b9b85f386e669536faa0a1c..4201b2dc0d58358fd950730c6b4b0a52843783a3 100644
|
| --- a/net/dns/dns_response.h
|
| +++ b/net/dns/dns_response.h
|
| @@ -95,20 +95,24 @@ class NET_EXPORT_PRIVATE DnsResponse {
|
| DNS_PARSE_RESULT_MAX, // Bounding value for histograms.
|
| };
|
|
|
| - // Constructs an object with an IOBuffer large enough to read
|
| - // one byte more than largest possible response, to detect malformed
|
| - // responses.
|
| + // Constructs a response buffer large enough to store one byte more than
|
| + // largest possible response, to detect malformed responses.
|
| DnsResponse();
|
| - // Constructs response from |data|. Used for testing purposes only!
|
| +
|
| + // Constructs a response buffer of given length. Used for TCP transactions.
|
| + explicit DnsResponse(size_t length);
|
| +
|
| + // Constructs a response from |data|. Used for testing purposes only!
|
| DnsResponse(const void* data, size_t length, size_t answer_offset);
|
| +
|
| ~DnsResponse();
|
|
|
| // Internal buffer accessor into which actual bytes of response will be
|
| // read.
|
| IOBufferWithSize* io_buffer() { return io_buffer_.get(); }
|
|
|
| - // Returns false if the packet is shorter than the header or does not match
|
| - // |query| id or question.
|
| + // Assuming the internal buffer holds |nbytes| bytes, returns true iff the
|
| + // packet matches the |query| id and question.
|
| bool InitParse(int nbytes, const DnsQuery& query);
|
|
|
| // Returns true if response is valid, that is, after successful InitParse.
|
|
|