Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: net/dns/dns_response.h

Issue 11567031: [net/dns] Handle TC bit on DNS response in DnsTransaction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to 2nd review Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/dns/dns_response.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/dns/dns_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698