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

Side by Side Diff: net/dns/dns_query.h

Issue 9113022: Adds PriorityQueue and PrioritizedDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied review. Created 8 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DNS_DNS_QUERY_H_ 5 #ifndef NET_DNS_DNS_QUERY_H_
6 #define NET_DNS_DNS_QUERY_H_ 6 #define NET_DNS_DNS_QUERY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 14 matching lines...) Expand all
25 ~DnsQuery(); 25 ~DnsQuery();
26 26
27 // Clones |this| verbatim, with ID field of the header set to |id|. 27 // Clones |this| verbatim, with ID field of the header set to |id|.
28 DnsQuery* CloneWithNewId(uint16 id) const; 28 DnsQuery* CloneWithNewId(uint16 id) const;
29 29
30 // DnsQuery field accessors. 30 // DnsQuery field accessors.
31 uint16 id() const; 31 uint16 id() const;
32 base::StringPiece qname() const; 32 base::StringPiece qname() const;
33 uint16 qtype() const; 33 uint16 qtype() const;
34 34
35 // Returns the Question section of the query. Used when matching the 35 // Returns the Question section of the query. Used when matching the response.
36 // response.
37 base::StringPiece question() const; 36 base::StringPiece question() const;
38 37
39 // IOBuffer accessor to be used for writing out the query. 38 // IOBuffer accessor to be used for writing out the query.
40 IOBufferWithSize* io_buffer() const { return io_buffer_; } 39 IOBufferWithSize* io_buffer() const { return io_buffer_; }
41 40
42 private: 41 private:
43 DnsQuery(const DnsQuery& orig, uint16 id); 42 DnsQuery(const DnsQuery& orig, uint16 id);
44 43
45 // Size of the DNS name (*NOT* hostname) we are trying to resolve; used 44 // Size of the DNS name (*NOT* hostname) we are trying to resolve; used
46 // to calculate offsets. 45 // to calculate offsets.
47 size_t qname_size_; 46 size_t qname_size_;
48 47
49 // Contains query bytes to be consumed by higher level Write() call. 48 // Contains query bytes to be consumed by higher level Write() call.
50 scoped_refptr<IOBufferWithSize> io_buffer_; 49 scoped_refptr<IOBufferWithSize> io_buffer_;
51 50
52 DISALLOW_COPY_AND_ASSIGN(DnsQuery); 51 DISALLOW_COPY_AND_ASSIGN(DnsQuery);
53 }; 52 };
54 53
55 } // namespace net 54 } // namespace net
56 55
57 #endif // NET_DNS_DNS_QUERY_H_ 56 #endif // NET_DNS_DNS_QUERY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698