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/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index 6a7fe2b..c119135 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -851,7 +851,7 @@
recovery_window_ = std::max(min_congestion_window_, recovery_window_);
}
-QuicString BbrSender::GetDebugState() const {
+std::string BbrSender::GetDebugState() const {
std::ostringstream stream;
stream << ExportDebugState();
return stream.str();
@@ -875,7 +875,7 @@
return DebugState(*this);
}
-static QuicString ModeToString(BbrSender::Mode mode) {
+static std::string ModeToString(BbrSender::Mode mode) {
switch (mode) {
case BbrSender::STARTUP:
return "STARTUP";
diff --git a/quic/core/congestion_control/bbr_sender.h b/quic/core/congestion_control/bbr_sender.h
index 37e2695..efde0e5 100644
--- a/quic/core/congestion_control/bbr_sender.h
+++ b/quic/core/congestion_control/bbr_sender.h
@@ -129,7 +129,7 @@
QuicByteCount GetCongestionWindow() const override;
QuicByteCount GetSlowStartThreshold() const override;
CongestionControlType GetCongestionControlType() const override;
- QuicString GetDebugState() const override;
+ std::string GetDebugState() const override;
void OnApplicationLimited(QuicByteCount bytes_in_flight) override;
// End implementation of SendAlgorithmInterface.
diff --git a/quic/core/congestion_control/send_algorithm_interface.h b/quic/core/congestion_control/send_algorithm_interface.h
index 5df9a93..333a085 100644
--- a/quic/core/congestion_control/send_algorithm_interface.h
+++ b/quic/core/congestion_control/send_algorithm_interface.h
@@ -124,7 +124,7 @@
// Retrieves debugging information about the current state of the
// send algorithm.
- virtual QuicString GetDebugState() const = 0;
+ virtual std::string GetDebugState() const = 0;
// Called when the connection has no outstanding data to send. Specifically,
// this means that none of the data streams are write-blocked, there are no
diff --git a/quic/core/congestion_control/send_algorithm_test.cc b/quic/core/congestion_control/send_algorithm_test.cc
index d7bfd85..3b93696 100644
--- a/quic/core/congestion_control/send_algorithm_test.cc
+++ b/quic/core/congestion_control/send_algorithm_test.cc
@@ -132,7 +132,8 @@
const CongestionControlType congestion_control_type;
};
-QuicString TestParamToString(const testing::TestParamInfo<TestParams>& params) {
+std::string TestParamToString(
+ const testing::TestParamInfo<TestParams>& params) {
return QuicStrCat(
CongestionControlTypeToString(params.param.congestion_control_type), "_");
}
@@ -268,7 +269,8 @@
SendAlgorithmInterface* sender_;
};
-INSTANTIATE_TEST_SUITE_P(SendAlgorithmTests, SendAlgorithmTest,
+INSTANTIATE_TEST_SUITE_P(SendAlgorithmTests,
+ SendAlgorithmTest,
::testing::ValuesIn(GetTestParams()),
TestParamToString);
diff --git a/quic/core/congestion_control/tcp_cubic_sender_bytes.cc b/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
index 5b843eb..4eefb46 100644
--- a/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
+++ b/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
@@ -260,7 +260,7 @@
HandleRetransmissionTimeout();
}
-QuicString TcpCubicSenderBytes::GetDebugState() const {
+std::string TcpCubicSenderBytes::GetDebugState() const {
return "";
}
diff --git a/quic/core/congestion_control/tcp_cubic_sender_bytes.h b/quic/core/congestion_control/tcp_cubic_sender_bytes.h
index 0ecb6f4..080a92d 100644
--- a/quic/core/congestion_control/tcp_cubic_sender_bytes.h
+++ b/quic/core/congestion_control/tcp_cubic_sender_bytes.h
@@ -73,7 +73,7 @@
bool InSlowStart() const override;
bool InRecovery() const override;
bool ShouldSendProbingPacket() const override;
- QuicString GetDebugState() const override;
+ std::string GetDebugState() const override;
void OnApplicationLimited(QuicByteCount bytes_in_flight) override;
// End implementation of SendAlgorithmInterface.