Replace QuicString with std::string, pass 1
This replaces QuicString with std::string in all of the "QUIC proper". I will
delete QuicString once all code using it is gone.
gfe-relnote: n/a (no functional change)
PiperOrigin-RevId: 237872023
Change-Id: I82de62c9855516b15039734d05155917e68ff4ee
diff --git a/quic/core/quic_stream_sequencer.cc b/quic/core/quic_stream_sequencer.cc
index 6311dcf..47c7c9f 100644
--- a/quic/core/quic_stream_sequencer.cc
+++ b/quic/core/quic_stream_sequencer.cc
@@ -60,12 +60,12 @@
const char* data_buffer) {
const size_t previous_readable_bytes = buffered_frames_.ReadableBytes();
size_t bytes_written;
- QuicString error_details;
+ std::string error_details;
QuicErrorCode result = buffered_frames_.OnStreamData(
byte_offset, QuicStringPiece(data_buffer, data_len), &bytes_written,
&error_details);
if (result != QUIC_NO_ERROR) {
- QuicString details = QuicStrCat(
+ std::string details = QuicStrCat(
"Stream ", stream_->id(), ": ", QuicErrorCodeToString(result), ": ",
error_details,
"\nPeer Address: ", stream_->PeerAddressOfLatestPacket().ToString());
@@ -161,7 +161,7 @@
return buffered_frames_.PrefetchNextRegion(iov);
}
-void QuicStreamSequencer::Read(QuicString* buffer) {
+void QuicStreamSequencer::Read(std::string* buffer) {
DCHECK(!blocked_);
buffer->resize(buffer->size() + ReadableBytes());
iovec iov;
@@ -172,12 +172,12 @@
int QuicStreamSequencer::Readv(const struct iovec* iov, size_t iov_len) {
DCHECK(!blocked_);
- QuicString error_details;
+ std::string error_details;
size_t bytes_read;
QuicErrorCode read_error =
buffered_frames_.Readv(iov, iov_len, &bytes_read, &error_details);
if (read_error != QUIC_NO_ERROR) {
- QuicString details =
+ std::string details =
QuicStrCat("Stream ", stream_->id(), ": ", error_details);
stream_->CloseConnectionWithDetails(read_error, details);
return static_cast<int>(bytes_read);
@@ -259,7 +259,7 @@
return buffered_frames_.BytesConsumed();
}
-const QuicString QuicStreamSequencer::DebugString() const {
+const std::string QuicStreamSequencer::DebugString() const {
// clang-format off
return QuicStrCat("QuicStreamSequencer:",
"\n bytes buffered: ", NumBytesBuffered(),