diff options
Diffstat (limited to 'net/quic/quic_data_writer.cc')
-rw-r--r-- | net/quic/quic_data_writer.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/quic/quic_data_writer.cc b/net/quic/quic_data_writer.cc index 4182d9a..e52cd03 100644 --- a/net/quic/quic_data_writer.cc +++ b/net/quic/quic_data_writer.cc @@ -98,6 +98,18 @@ bool QuicDataWriter::WriteBytes(const void* data, size_t data_len) { return true; } +bool QuicDataWriter::WriteRepeatedByte(uint8 byte, size_t count) { + char* dest = BeginWrite(count); + if (!dest) { + return false; + } + + memset(dest, byte, count); + + length_ += count; + return true; +} + void QuicDataWriter::WritePadding() { DCHECK_LE(length_, capacity_); if (length_ > capacity_) { |