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

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

Issue 14411004: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use CONFIG_VERSION insteaf of VERSION Created 7 years, 8 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/mock_random.h
diff --git a/net/quic/test_tools/mock_random.h b/net/quic/test_tools/mock_random.h
index b583182a6b09e7a5846815919a1200604580e9ac..1278297fbfaee0a73f1db5f75812b6f16002b732 100644
--- a/net/quic/test_tools/mock_random.h
+++ b/net/quic/test_tools/mock_random.h
@@ -12,16 +12,23 @@ namespace net {
class MockRandom : public QuicRandom {
public:
+ MockRandom();
+
// QuicRandom:
- // Fills the |data| buffer with 'r'.
+ // Fills the |data| buffer with a repeating byte, initially 'r'.
virtual void RandBytes(void* data, size_t len) OVERRIDE;
- // Returns 0xDEADBEEF.
+ // Returns 0xDEADBEEF + the current increment.
virtual uint64 RandUint64() OVERRIDE;
// Returns false.
virtual bool RandBool() OVERRIDE;
- // Does nothing.
+ // Reseed advances |increment_| which causes the value returned by
+ // |RandUint64| to increment and the byte that |RandBytes| fills with, to
+ // advance.
virtual void Reseed(const void* additional_entropy,
size_t entropy_len) OVERRIDE;
+
+ private:
+ uint8 increment_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698