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

Unified Diff: net/quic/test_tools/mock_random.cc

Issue 103973007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for android compile error Created 7 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/quic/test_tools/mock_random.h ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/mock_random.cc
diff --git a/net/quic/test_tools/mock_random.cc b/net/quic/test_tools/mock_random.cc
index 19a2832bbaa2bd2d5dc67108e825454d9c5b3954..ab71d1634c83bcfb52aa915558649d512f24e52e 100644
--- a/net/quic/test_tools/mock_random.cc
+++ b/net/quic/test_tools/mock_random.cc
@@ -7,7 +7,13 @@
namespace net {
MockRandom::MockRandom()
- : increment_(0) {
+ : base_(0xDEADBEEF),
+ increment_(0) {
+}
+
+MockRandom::MockRandom(uint32 base)
+ : base_(base),
+ increment_(0) {
}
void MockRandom::RandBytes(void* data, size_t len) {
@@ -15,11 +21,7 @@ void MockRandom::RandBytes(void* data, size_t len) {
}
uint64 MockRandom::RandUint64() {
- return 0xDEADBEEF + increment_;
-}
-
-bool MockRandom::RandBool() {
- return false;
+ return base_ + increment_;
}
void MockRandom::Reseed(const void* additional_entropy, size_t entropy_len) {
« no previous file with comments | « net/quic/test_tools/mock_random.h ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698