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

Unified Diff: net/dns/dns_test_util.cc

Issue 8835011: Revert 113282 - Isolates generic DnsClient from AsyncHostResolver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/dns/dns_test_util.h ('k') | net/dns/dns_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_test_util.cc
===================================================================
--- net/dns/dns_test_util.cc (revision 113383)
+++ net/dns/dns_test_util.cc (working copy)
@@ -8,6 +8,20 @@
namespace net {
+TestPrng::TestPrng(const std::deque<int>& numbers) : numbers_(numbers) {
+}
+
+TestPrng::~TestPrng() {
+}
+
+int TestPrng::GetNext(int min, int max) {
+ DCHECK(!numbers_.empty());
+ int rv = numbers_.front();
+ numbers_.pop_front();
+ DCHECK(rv >= min && rv <= max);
+ return rv;
+}
+
bool ConvertStringsToIPAddressList(
const char* const ip_strings[], size_t size, IPAddressList* address_list) {
DCHECK(address_list);
« no previous file with comments | « net/dns/dns_test_util.h ('k') | net/dns/dns_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698