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

Unified Diff: net/quic/test_tools/quic_test_utils.h

Issue 2323963002: Implement an event-based simulator for QuicConnection (Closed)
Patch Set: Adding missing files. Created 4 years, 3 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/quic/test_tools/quic_test_utils.h
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index a2eb6e56e40e2905ed2cbdb67ca37754e8c9742c..b14bf06a33d67dbdd9752842aecbb498ca89514e 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -227,12 +227,16 @@ class QuicFlagSaver {
// for pseudo-randomly dropping packets in tests. It works by computing
// the sha1 hash of the current seed, and using the first 64 bits as
// the next random number, and the next seed.
-class SimpleRandom {
+class SimpleRandom : public QuicRandom {
public:
SimpleRandom() : seed_(0) {}
+ ~SimpleRandom() override {}
// Returns a random number in the range [0, kuint64max].
- uint64_t RandUint64();
+ uint64_t RandUint64() override;
+
+ void RandBytes(void* data, size_t len) override;
+ void Reseed(const void* additional_entropy, size_t len) override;
void set_seed(uint64_t seed) { seed_ = seed; }

Powered by Google App Engine
This is Rietveld 408576698