Chromium Code Reviews| Index: net/base/dns_query.h |
| diff --git a/net/base/dns_query.h b/net/base/dns_query.h |
| index c0884bf2946f14d6849732e00baa290a452d7a46..2abe9c8c9f9f0ecd119e57521ae2fa7c50e0bf4c 100644 |
| --- a/net/base/dns_query.h |
| +++ b/net/base/dns_query.h |
| @@ -8,11 +8,13 @@ |
| #include <string> |
| +#include "base/rand_util.h" |
|
cbentzel
2011/06/28 19:08:18
You don't need this include anymore
willchan no longer on Chromium
2011/06/28 19:10:47
Is this header still necessary?
agayev
2011/06/28 19:49:55
Done.
|
| #include "net/base/io_buffer.h" |
| #include "net/base/net_api.h" |
| #include "net/base/net_util.h" |
| +#include "net/base/rand_callback.h" |
| -namespace net{ |
| +namespace net { |
| // Represents on-the-wire DNS query message as an object. |
| class NET_TEST DnsQuery { |
| @@ -23,7 +25,9 @@ class NET_TEST DnsQuery { |
| // Every generated object has a random ID, hence two objects generated |
| // with the same set of constructor arguments are generally not equal; |
| // there is a 1/2^16 chance of them being equal due to size of |id_|. |
| - DnsQuery(const std::string& dns_name, uint16 qtype, uint64 (*prng)()); |
| + DnsQuery(const std::string& dns_name, |
| + uint16 qtype, |
| + const RandIntCallback& rand_int); |
| ~DnsQuery(); |
| // Clones |this| verbatim with ID field of the header regenerated. |
| @@ -64,7 +68,7 @@ class NET_TEST DnsQuery { |
| scoped_refptr<IOBufferWithSize> io_buffer_; |
| // PRNG function for generating IDs. |
| - uint64 (*prng_)(); |
| + RandIntCallback rand_int_; |
| }; |
| } // namespace net |