Index: net/quic/test_tools/quic_test_utils.cc |
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc |
index 1514f2d28df230b3172c9e548d0ac19b704b78d8..28f7115655eae9d509833704728d52c6d4a95558 100644 |
--- a/net/quic/test_tools/quic_test_utils.cc |
+++ b/net/quic/test_tools/quic_test_utils.cc |
@@ -117,6 +117,22 @@ uint64_t SimpleRandom::RandUint64() { |
return seed_; |
} |
+void SimpleRandom::RandBytes(void* data, size_t len) { |
+ uint8_t* real_data = static_cast<uint8_t*>(data); |
+ for (size_t offset = 0; offset < len; offset++) { |
+ real_data[offset] = RandUint64() & 0xff; |
+ } |
+} |
+ |
+void SimpleRandom::Reseed(const void* additional_entropy, size_t len) { |
+ const uint8_t* real_entropy = static_cast<const uint8_t*>(additional_entropy); |
+ for (size_t offset = 0; offset < len; offset++) { |
+ // Note: this is not actually a well-established way to incorporate new |
+ // entropy, but good enough for tests. |
+ seed_ *= real_entropy[len]; |
+ } |
+} |
+ |
MockFramerVisitor::MockFramerVisitor() { |
// By default, we want to accept packets. |
ON_CALL(*this, OnProtocolVersionMismatch(_)) |
@@ -418,7 +434,7 @@ TestQuicSpdyServerSession::CreateQuicCryptoServerStream( |
QuicCompressedCertsCache* compressed_certs_cache) { |
return new QuicCryptoServerStream(crypto_config, compressed_certs_cache, |
FLAGS_enable_quic_stateless_reject_support, |
- this); |
+ this, &helper_); |
} |
QuicCryptoServerStream* TestQuicSpdyServerSession::GetCryptoStream() { |