Chromium Code Reviews| Index: net/dns/dns_response.h |
| diff --git a/net/dns/dns_response.h b/net/dns/dns_response.h |
| index cb61e1fb1efbbb2c2b9b85f386e669536faa0a1c..82476fd373597c74c21a097bbd488f33c775e3be 100644 |
| --- a/net/dns/dns_response.h |
| +++ b/net/dns/dns_response.h |
| @@ -95,10 +95,11 @@ 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(); |
| + // Construct a response buffer of given length. Used for TCP transactions. |
|
mmenke
2012/12/19 16:44:09
nit: For consistency, should start all constructo
szym
2012/12/19 23:35:56
Done.
|
| + explicit DnsResponse(size_t length); |
| // Constructs response from |data|. Used for testing purposes only! |
| DnsResponse(const void* data, size_t length, size_t answer_offset); |
| ~DnsResponse(); |
| @@ -107,8 +108,8 @@ class NET_EXPORT_PRIVATE DnsResponse { |
| // 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. |