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

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: 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
Index: net/base/dns_query.h
diff --git a/net/base/dns_query.h b/net/base/dns_query.h
index c0884bf2946f14d6849732e00baa290a452d7a46..7a5e9a133cb499659f2d23ec3167cf09008d0a63 100644
--- a/net/base/dns_query.h
+++ b/net/base/dns_query.h
@@ -8,6 +8,7 @@
#include <string>
+#include "base/rand_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_api.h"
#include "net/base/net_util.h"
@@ -23,7 +24,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 base::RandIntCallback& rand_int);
~DnsQuery();
// Clones |this| verbatim with ID field of the header regenerated.
@@ -64,7 +67,7 @@ class NET_TEST DnsQuery {
scoped_refptr<IOBufferWithSize> io_buffer_;
// PRNG function for generating IDs.
- uint64 (*prng_)();
+ base::RandIntCallback rand_int_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698