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

Unified Diff: net/base/dns_query.h

Issue 7276014: DnsQuery: changed raw function pointer to callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed header ordering. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/dns_query.cc » ('j') | net/base/dns_query.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | net/base/dns_query.cc » ('j') | net/base/dns_query.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698