| Index: net/quic/core/quic_packet_creator.h
|
| diff --git a/net/quic/core/quic_packet_creator.h b/net/quic/core/quic_packet_creator.h
|
| index c8bf0ae66c0a8ab73554a2584e529f3f2e0c3dc8..1e992c549423de23533e0e881d914198f685892b 100644
|
| --- a/net/quic/core/quic_packet_creator.h
|
| +++ b/net/quic/core/quic_packet_creator.h
|
| @@ -29,8 +29,6 @@ namespace test {
|
| class QuicPacketCreatorPeer;
|
| }
|
|
|
| -class QuicRandom;
|
| -
|
| class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| public:
|
| // A delegate interface for further processing serialized packet.
|
| @@ -55,10 +53,8 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| virtual void OnFrameAddedToPacket(const QuicFrame& frame) {}
|
| };
|
|
|
| - // QuicRandom* required for packet entropy.
|
| QuicPacketCreator(QuicConnectionId connection_id,
|
| QuicFramer* framer,
|
| - QuicRandom* random_generator,
|
| QuicBufferAllocator* buffer_allocator,
|
| DelegateInterface* delegate);
|
|
|
| @@ -166,8 +162,6 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| QuicPacketLength length);
|
|
|
| // Creates a version negotiation packet which supports |supported_versions|.
|
| - // Also, sets the entropy hash of the serialized packet to a random bool and
|
| - // returns that value as a member of SerializedPacket.
|
| std::unique_ptr<QuicEncryptedPacket> SerializeVersionNegotiationPacket(
|
| const QuicVersionVector& supported_versions);
|
|
|
| @@ -223,30 +217,6 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| private:
|
| friend class test::QuicPacketCreatorPeer;
|
|
|
| - // A QuicRandom wrapper that gets a bucket of entropy and distributes it
|
| - // bit-by-bit. Replenishes the bucket as needed. Not thread-safe. Expose this
|
| - // class if single bit randomness is needed elsewhere.
|
| - class QuicRandomBoolSource {
|
| - public:
|
| - // random: Source of entropy. Not owned.
|
| - explicit QuicRandomBoolSource(QuicRandom* random);
|
| -
|
| - ~QuicRandomBoolSource();
|
| -
|
| - // Returns the next random bit from the bucket.
|
| - bool RandBool();
|
| -
|
| - private:
|
| - // Source of entropy.
|
| - QuicRandom* random_;
|
| - // Stored random bits.
|
| - uint64_t bit_bucket_;
|
| - // The next available bit has "1" in the mask. Zero means empty bucket.
|
| - uint64_t bit_mask_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(QuicRandomBoolSource);
|
| - };
|
| -
|
| static bool ShouldRetransmit(const QuicFrame& frame);
|
|
|
| // Converts a raw payload to a frame which fits into the current open
|
| @@ -283,8 +253,7 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
|
|
| // Serializes all frames which have been added and adds any which should be
|
| // retransmitted to packet_.retransmittable_frames. All frames must fit into
|
| - // a single packet. Sets the entropy hash of the serialized packet to a
|
| - // random bool.
|
| + // a single packet.
|
| // Fails if |buffer_len| isn't long enough for the encrypted packet.
|
| void SerializePacket(char* encrypted_buffer, size_t buffer_len);
|
|
|
| @@ -304,7 +273,6 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| DebugDelegate* debug_delegate_;
|
| QuicFramer* framer_;
|
|
|
| - QuicRandomBoolSource random_bool_source_;
|
| QuicBufferAllocator* const buffer_allocator_;
|
|
|
| // Controls whether version should be included while serializing the packet.
|
|
|