Replace QuicheStrCat() with absl::StrCat()
PiperOrigin-RevId: 345586710
Change-Id: I494392852e09fa7916d4430290096b37ae37a922
diff --git a/quic/core/legacy_quic_stream_id_manager_test.cc b/quic/core/legacy_quic_stream_id_manager_test.cc
index b7ba1d2..5b1f74e 100644
--- a/quic/core/legacy_quic_stream_id_manager_test.cc
+++ b/quic/core/legacy_quic_stream_id_manager_test.cc
@@ -6,13 +6,13 @@
#include <utility>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_types.h"
#include "net/third_party/quiche/src/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quic/core/quic_versions.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_session_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
namespace test {
@@ -31,7 +31,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
ParsedQuicVersionToString(p.version),
(p.perspective == Perspective::IS_CLIENT ? "Client" : "Server"));
}
diff --git a/quic/core/quic_coalesced_packet.cc b/quic/core/quic_coalesced_packet.cc
index e266a76..4b4bc40 100644
--- a/quic/core/quic_coalesced_packet.cc
+++ b/quic/core/quic_coalesced_packet.cc
@@ -4,9 +4,9 @@
#include "net/third_party/quiche/src/quic/core/quic_coalesced_packet.h"
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_ptr_util.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -154,20 +154,19 @@
std::string QuicCoalescedPacket::ToString(size_t serialized_length) const {
// Total length and padding size.
- std::string info = quiche::QuicheStrCat(
+ std::string info = absl::StrCat(
"total_length: ", serialized_length,
" padding_size: ", serialized_length - length_, " packets: {");
// Packets' encryption levels.
bool first_packet = true;
for (int8_t i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
if (ContainsPacketOfEncryptionLevel(static_cast<EncryptionLevel>(i))) {
- info = quiche::QuicheStrCat(
- info, first_packet ? "" : ", ",
- EncryptionLevelToString(static_cast<EncryptionLevel>(i)));
+ absl::StrAppend(&info, first_packet ? "" : ", ",
+ EncryptionLevelToString(static_cast<EncryptionLevel>(i)));
first_packet = false;
}
}
- info = quiche::QuicheStrCat(info, "}");
+ absl::StrAppend(&info, "}");
return info;
}
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index bc959e7..27b2664 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -16,6 +16,7 @@
#include <utility>
#include "absl/strings/escaping.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_protocol.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_utils.h"
@@ -44,7 +45,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_map_util.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_socket_address.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_string_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
namespace quic {
@@ -480,7 +480,7 @@
} else {
received_value = "none";
}
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Bad original_connection_id: expected ",
original_destination_connection_id_.value().ToString(), ", received ",
received_value, ", RETRY used ", server_connection_id_.ToString());
@@ -492,7 +492,7 @@
// We did not receive a RETRY packet, make sure we did not receive the
// original_destination_connection_id transport parameter.
if (config.HasReceivedOriginalConnectionId()) {
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Bad original_connection_id: did not receive RETRY but received ",
config.ReceivedOriginalConnectionId().ToString());
CloseConnection(IETF_QUIC_PROTOCOL_VIOLATION, error_details,
@@ -532,9 +532,9 @@
received_value = "none";
}
std::string error_details =
- quiche::QuicheStrCat("Bad initial_source_connection_id: expected ",
- expected_initial_source_connection_id.ToString(),
- ", received ", received_value);
+ absl::StrCat("Bad initial_source_connection_id: expected ",
+ expected_initial_source_connection_id.ToString(),
+ ", received ", received_value);
CloseConnection(IETF_QUIC_PROTOCOL_VIOLATION, error_details,
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
return false;
@@ -550,10 +550,10 @@
} else {
received_value = "none";
}
- std::string error_details = quiche::QuicheStrCat(
- "Bad original_destination_connection_id: expected ",
- GetOriginalDestinationConnectionId().ToString(), ", received ",
- received_value);
+ std::string error_details =
+ absl::StrCat("Bad original_destination_connection_id: expected ",
+ GetOriginalDestinationConnectionId().ToString(),
+ ", received ", received_value);
CloseConnection(IETF_QUIC_PROTOCOL_VIOLATION, error_details,
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
return false;
@@ -572,9 +572,9 @@
received_value = "none";
}
std::string error_details =
- quiche::QuicheStrCat("Bad retry_source_connection_id: expected ",
- retry_source_connection_id_.value().ToString(),
- ", received ", received_value);
+ absl::StrCat("Bad retry_source_connection_id: expected ",
+ retry_source_connection_id_.value().ToString(),
+ ", received ", received_value);
CloseConnection(IETF_QUIC_PROTOCOL_VIOLATION, error_details,
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
return false;
@@ -583,7 +583,7 @@
// We did not receive a RETRY packet, make sure we did not receive the
// retry_source_connection_id transport parameter.
if (config.HasReceivedRetrySourceConnectionId()) {
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Bad retry_source_connection_id: did not receive RETRY but "
"received ",
config.ReceivedRetrySourceConnectionId().ToString());
@@ -939,7 +939,7 @@
}
if (QuicContainsValue(packet.versions, version())) {
- const std::string error_details = quiche::QuicheStrCat(
+ const std::string error_details = absl::StrCat(
"Server already supports client's version ",
ParsedQuicVersionToString(version()),
" and should have accepted the connection instead of sending {",
@@ -953,7 +953,7 @@
server_supported_versions_ = packet.versions;
CloseConnection(
QUIC_INVALID_VERSION,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Client may support one of the versions in the server's list, but "
"it's going to close the connection anyway. Supported versions: {",
ParsedQuicVersionVectorToString(framer_.supported_versions()),
@@ -2039,12 +2039,12 @@
sent_packet_manager_.GetLeastUnacked() + max_tracked_packets_) {
CloseConnection(
QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS,
- quiche::QuicheStrCat(
- "More than ", max_tracked_packets_, " outstanding, least_unacked: ",
- sent_packet_manager_.GetLeastUnacked().ToUint64(),
- ", packets_processed: ", stats_.packets_processed,
- ", last_decrypted_packet_level: ",
- EncryptionLevelToString(last_decrypted_packet_level_)),
+ absl::StrCat("More than ", max_tracked_packets_,
+ " outstanding, least_unacked: ",
+ sent_packet_manager_.GetLeastUnacked().ToUint64(),
+ ", packets_processed: ", stats_.packets_processed,
+ ", last_decrypted_packet_level: ",
+ EncryptionLevelToString(last_decrypted_packet_level_)),
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
}
}
@@ -2280,7 +2280,7 @@
<< " integrity_limit=" << integrity_limit;
if (stats_.num_failed_authentication_packets_received >=
integrity_limit) {
- const std::string error_details = quiche::QuicheStrCat(
+ const std::string error_details = absl::StrCat(
"decrypter integrity limit reached:"
" num_failed_authentication_packets_received=",
stats_.num_failed_authentication_packets_received,
@@ -2328,14 +2328,14 @@
}
std::string QuicConnection::UndecryptablePacketsInfo() const {
- std::string info = quiche::QuicheStrCat(
+ std::string info = absl::StrCat(
"num_undecryptable_packets: ", undecryptable_packets_.size(), " {");
for (const auto& packet : undecryptable_packets_) {
- info = quiche::QuicheStrCat(
- info, "[", EncryptionLevelToString(packet.encryption_level), ", ",
- packet.packet->length(), ", ", packet.processed, "]");
+ absl::StrAppend(&info, "[",
+ EncryptionLevelToString(packet.encryption_level), ", ",
+ packet.packet->length(), ", ", packet.processed, "]");
}
- info = quiche::QuicheStrCat(info, "}");
+ absl::StrAppend(&info, "}");
return info;
}
@@ -3208,10 +3208,10 @@
// sparse, so this might overcount, but doing a key update earlier than
// necessary would only improve security and has negligible cost.
if (packet.packet_number < lowest_packet_sent_in_current_key_phase_) {
- const std::string error_details = quiche::QuicheStrCat(
- "packet_number(", packet.packet_number.ToString(),
- ") < lowest_packet_sent_in_current_key_phase_ (",
- lowest_packet_sent_in_current_key_phase_.ToString(), ")");
+ const std::string error_details =
+ absl::StrCat("packet_number(", packet.packet_number.ToString(),
+ ") < lowest_packet_sent_in_current_key_phase_ (",
+ lowest_packet_sent_in_current_key_phase_.ToString(), ")");
QUIC_BUG << error_details;
CloseConnection(QUIC_INTERNAL_ERROR, error_details,
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
@@ -3250,7 +3250,7 @@
if (num_packets_encrypted_in_current_key_phase >= confidentiality_limit) {
// Reached the confidentiality limit without initiating a key update,
// must close the connection.
- const std::string error_details = quiche::QuicheStrCat(
+ const std::string error_details = absl::StrCat(
"encrypter confidentiality limit reached: "
"num_packets_encrypted_in_current_key_phase=",
num_packets_encrypted_in_current_key_phase,
@@ -3381,7 +3381,7 @@
}
write_error_occurred_ = true;
- const std::string error_details = quiche::QuicheStrCat(
+ const std::string error_details = absl::StrCat(
"Write failed with error: ", error_code, " (", strerror(error_code), ")");
QUIC_LOG_FIRST_N(ERROR, 2) << ENDPOINT << error_details;
switch (error_code) {
@@ -5375,13 +5375,12 @@
void QuicConnection::OnHandshakeTimeout() {
const QuicTime::Delta duration =
clock_->ApproximateNow() - stats_.connection_creation_time;
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Handshake timeout expired after ", duration.ToDebuggingValue(),
". Timeout:",
idle_network_detector_.handshake_timeout().ToDebuggingValue());
if (perspective() == Perspective::IS_CLIENT && version().UsesTls()) {
- error_details =
- quiche::QuicheStrCat(error_details, UndecryptablePacketsInfo());
+ absl::StrAppend(&error_details, UndecryptablePacketsInfo());
}
QUIC_DVLOG(1) << ENDPOINT << error_details;
CloseConnection(QUIC_HANDSHAKE_TIMEOUT, error_details,
@@ -5392,7 +5391,7 @@
const QuicTime::Delta duration =
clock_->ApproximateNow() -
idle_network_detector_.last_network_activity_time();
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"No recent network activity after ", duration.ToDebuggingValue(),
". Timeout:",
idle_network_detector_.idle_network_timeout().ToDebuggingValue());
@@ -5406,8 +5405,8 @@
!has_consecutive_pto) {
// Include stream information in error detail if there are open streams.
QUIC_RELOADABLE_FLAG_COUNT(quic_add_stream_info_to_idle_close_detail);
- error_details = quiche::QuicheStrCat(
- error_details, ", ", visitor_->GetStreamsInfoForLogging());
+ absl::StrAppend(&error_details, ", ",
+ visitor_->GetStreamsInfoForLogging());
}
CloseConnection(QUIC_NETWORK_IDLE_TIMEOUT, error_details,
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 0242cbe..0e506ad 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -12,6 +12,7 @@
#include <utility>
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/congestion_control/loss_detection_interface.h"
#include "net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.h"
@@ -46,7 +47,6 @@
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
#include "net/third_party/quiche/src/quic/test_tools/simple_data_producer.h"
#include "net/third_party/quiche/src/quic/test_tools/simple_session_notifier.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using testing::_;
using testing::AnyNumber;
@@ -563,7 +563,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
ParsedQuicVersionToString(p.version), "_",
(p.ack_response == AckResponse::kDefer ? "defer" : "immediate"), "_",
(p.no_stop_waiting ? "No" : ""), "StopWaiting");
@@ -1565,8 +1565,8 @@
kPeerAddress, ENCRYPTION_INITIAL);
// Cause self_address change to mapped Ipv4 address.
QuicIpAddress host2;
- host2.FromString(quiche::QuicheStrCat(
- "::ffff:", connection_.self_address().host().ToString()));
+ host2.FromString(
+ absl::StrCat("::ffff:", connection_.self_address().host().ToString()));
QuicSocketAddress self_address2(host2, connection_.self_address().port());
ProcessFramePacketWithAddresses(MakeCryptoFrame(), self_address2,
kPeerAddress, ENCRYPTION_INITIAL);
diff --git a/quic/core/quic_control_frame_manager.cc b/quic/core/quic_control_frame_manager.cc
index fddf087..c4bee6e 100644
--- a/quic/core/quic_control_frame_manager.cc
+++ b/quic/core/quic_control_frame_manager.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_ack_frequency_frame.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_frame.h"
#include "net/third_party/quiche/src/quic/core/quic_constants.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_map_util.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -45,10 +45,9 @@
if (control_frames_.size() > kMaxNumControlFrames) {
delegate_->OnControlFrameManagerError(
QUIC_TOO_MANY_BUFFERED_CONTROL_FRAMES,
- quiche::QuicheStrCat(
- "More than ", kMaxNumControlFrames,
- "buffered control frames, least_unacked: ", least_unacked_,
- ", least_unsent_: ", least_unsent_));
+ absl::StrCat("More than ", kMaxNumControlFrames,
+ "buffered control frames, least_unacked: ", least_unacked_,
+ ", least_unsent_: ", least_unsent_));
return;
}
if (had_buffered_frames) {
@@ -145,10 +144,9 @@
if (control_frames_.size() > kMaxNumControlFrames) {
delegate_->OnControlFrameManagerError(
QUIC_TOO_MANY_BUFFERED_CONTROL_FRAMES,
- quiche::QuicheStrCat(
- "More than ", kMaxNumControlFrames,
- "buffered control frames, least_unacked: ", least_unacked_,
- ", least_unsent_: ", least_unsent_));
+ absl::StrCat("More than ", kMaxNumControlFrames,
+ "buffered control frames, least_unacked: ", least_unacked_,
+ ", least_unsent_: ", least_unsent_));
return;
}
WriteBufferedFrames();
diff --git a/quic/core/quic_crypto_client_handshaker.cc b/quic/core/quic_crypto_client_handshaker.cc
index 74f0724..32ba936 100644
--- a/quic/core/quic_crypto_client_handshaker.cc
+++ b/quic/core/quic_crypto_client_handshaker.cc
@@ -7,13 +7,13 @@
#include <memory>
#include <string>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_protocol.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_utils.h"
#include "net/third_party/quiche/src/quic/core/quic_session.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_client_stats.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -298,9 +298,8 @@
if (num_client_hellos_ >= QuicCryptoClientStream::kMaxClientHellos) {
stream_->OnUnrecoverableError(
QUIC_CRYPTO_TOO_MANY_REJECTS,
- quiche::QuicheStrCat("More than ",
- QuicCryptoClientStream::kMaxClientHellos,
- " rejects"));
+ absl::StrCat("More than ", QuicCryptoClientStream::kMaxClientHellos,
+ " rejects"));
return;
}
num_client_hellos_++;
@@ -553,8 +552,8 @@
if (in->tag() != kSHLO) {
stream_->OnUnrecoverableError(
QUIC_INVALID_CRYPTO_MESSAGE_TYPE,
- quiche::QuicheStrCat("Expected SHLO or REJ. Received: ",
- QuicTagToString(in->tag())));
+ absl::StrCat("Expected SHLO or REJ. Received: ",
+ QuicTagToString(in->tag())));
return;
}
diff --git a/quic/core/quic_data_writer_test.cc b/quic/core/quic_data_writer_test.cc
index ef83ac8..0247362 100644
--- a/quic/core/quic_data_writer_test.cc
+++ b/quic/core/quic_data_writer_test.cc
@@ -8,6 +8,7 @@
#include <cstring>
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/quic_connection_id.h"
#include "net/third_party/quiche/src/quic/core/quic_data_reader.h"
@@ -17,7 +18,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/quiche_endian.h"
#include "net/third_party/quiche/src/common/test_tools/quiche_test_utils.h"
@@ -37,7 +37,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
(p.endianness == quiche::NETWORK_BYTE_ORDER ? "Network" : "Host"),
"ByteOrder");
}
diff --git a/quic/core/quic_dispatcher_test.cc b/quic/core/quic_dispatcher_test.cc
index a8d4068..d65159f 100644
--- a/quic/core/quic_dispatcher_test.cc
+++ b/quic/core/quic_dispatcher_test.cc
@@ -10,6 +10,7 @@
#include <utility>
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/chlo_extractor.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_handshake.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_protocol.h"
@@ -37,7 +38,6 @@
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_time_wait_list_manager_peer.h"
#include "net/third_party/quiche/src/quic/tools/quic_simple_crypto_server_stream_helper.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/test_tools/quiche_test_utils.h"
using testing::_;
@@ -2186,9 +2186,8 @@
QuicBufferedPacketStorePeer::set_clock(store, mock_helper_.GetClock());
QuicConnectionId conn_id = TestConnectionId(1);
- ProcessPacket(client_addr_, conn_id, true,
- quiche::QuicheStrCat("data packet ", 2), CONNECTION_ID_PRESENT,
- PACKET_4BYTE_PACKET_NUMBER,
+ ProcessPacket(client_addr_, conn_id, true, absl::StrCat("data packet ", 2),
+ CONNECTION_ID_PRESENT, PACKET_4BYTE_PACKET_NUMBER,
/*packet_number=*/2);
mock_helper_.AdvanceTime(
diff --git a/quic/core/quic_error_codes.cc b/quic/core/quic_error_codes.cc
index 9abde9f..65db041 100644
--- a/quic/core/quic_error_codes.cc
+++ b/quic/core/quic_error_codes.cc
@@ -5,10 +5,10 @@
#include <cstdint>
#include <cstring>
+#include "absl/strings/str_cat.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -269,15 +269,15 @@
std::string QuicIetfTransportErrorCodeString(QuicIetfTransportErrorCodes c) {
if (static_cast<uint64_t>(c) >= 0xff00u) {
- return quiche::QuicheStrCat("Private(", static_cast<uint64_t>(c), ")");
+ return absl::StrCat("Private(", static_cast<uint64_t>(c), ")");
}
if (c >= CRYPTO_ERROR_FIRST && c <= CRYPTO_ERROR_LAST) {
const int tls_error = static_cast<int>(c - CRYPTO_ERROR_FIRST);
const char* tls_error_description = SSL_alert_desc_string_long(tls_error);
if (strcmp("unknown", tls_error_description) != 0) {
- return quiche::QuicheStrCat("CRYPTO_ERROR(", tls_error_description, ")");
+ return absl::StrCat("CRYPTO_ERROR(", tls_error_description, ")");
}
- return quiche::QuicheStrCat("CRYPTO_ERROR(unknown(", tls_error, "))");
+ return absl::StrCat("CRYPTO_ERROR(unknown(", tls_error, "))");
}
switch (c) {
@@ -304,7 +304,7 @@
break;
}
- return quiche::QuicheStrCat("Unknown(", static_cast<uint64_t>(c), ")");
+ return absl::StrCat("Unknown(", static_cast<uint64_t>(c), ")");
}
std::ostream& operator<<(std::ostream& os,
diff --git a/quic/core/quic_flow_controller.cc b/quic/core/quic_flow_controller.cc
index 625cf46..4f4ba7c 100644
--- a/quic/core/quic_flow_controller.cc
+++ b/quic/core/quic_flow_controller.cc
@@ -6,6 +6,7 @@
#include <cstdint>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_connection.h"
#include "net/third_party/quiche/src/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/quic/core/quic_session.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -25,7 +25,7 @@
if (is_connection_flow_controller_) {
return "connection";
}
- return quiche::QuicheStrCat("stream ", id_);
+ return absl::StrCat("stream ", id_);
}
QuicFlowController::QuicFlowController(
@@ -99,8 +99,8 @@
// This is an error on our side, close the connection as soon as possible.
connection_->CloseConnection(
QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA,
- quiche::QuicheStrCat(send_window_offset_ - (bytes_sent_ + bytes_sent),
- "bytes over send window offset"),
+ absl::StrCat(send_window_offset_ - (bytes_sent_ + bytes_sent),
+ "bytes over send window offset"),
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
return;
}
diff --git a/quic/core/quic_flow_controller_test.cc b/quic/core/quic_flow_controller_test.cc
index 5a27570..3aec3e0 100644
--- a/quic/core/quic_flow_controller_test.cc
+++ b/quic/core/quic_flow_controller_test.cc
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/crypto/null_encrypter.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_expect_bug.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/quic/test_tools/quic_flow_controller_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_sent_packet_manager_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using testing::_;
using testing::Invoke;
@@ -95,9 +95,9 @@
// Try to send more bytes, violating flow control.
EXPECT_CALL(*connection_,
CloseConnection(QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA, _, _));
- EXPECT_QUIC_BUG(flow_controller_->AddBytesSent(send_window_ * 10),
- quiche::QuicheStrCat("Trying to send an extra ",
- send_window_ * 10, " bytes"));
+ EXPECT_QUIC_BUG(
+ flow_controller_->AddBytesSent(send_window_ * 10),
+ absl::StrCat("Trying to send an extra ", send_window_ * 10, " bytes"));
EXPECT_TRUE(flow_controller_->IsBlocked());
EXPECT_EQ(0u, flow_controller_->SendWindowSize());
}
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index c9ebdbe..ef8b29e 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -16,6 +16,7 @@
#include "absl/base/optimization.h"
#include "absl/strings/escaping.h"
#include "absl/strings/numbers.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_framer.h"
@@ -48,7 +49,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_map_util.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_stack_trace.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
namespace quic {
@@ -390,9 +390,8 @@
// the error value in the string.
return initial_error_string;
}
- return quiche::QuicheStrCat(
- std::to_string(static_cast<unsigned>(quic_error_code)), ":",
- initial_error_string);
+ return absl::StrCat(std::to_string(static_cast<unsigned>(quic_error_code)),
+ ":", initial_error_string);
}
} // namespace
@@ -1778,7 +1777,7 @@
QuicEncryptedPacket(encrypted_reader->FullPayload()),
decryption_level, has_decryption_key);
RecordDroppedPacketReason(DroppedPacketReason::DECRYPTION_FAILURE);
- set_detailed_error(quiche::QuicheStrCat(
+ set_detailed_error(absl::StrCat(
"Unable to decrypt ", EncryptionLevelToString(decryption_level),
" header protection", has_decryption_key ? "" : " (missing key)",
"."));
@@ -1846,7 +1845,7 @@
visitor_->OnUndecryptablePacket(
QuicEncryptedPacket(encrypted_reader->FullPayload()), decryption_level,
has_decryption_key);
- set_detailed_error(quiche::QuicheStrCat(
+ set_detailed_error(absl::StrCat(
"Unable to decrypt ", EncryptionLevelToString(decryption_level),
" payload with reconstructed packet number ",
header->packet_number.ToString(), " (largest decrypted was ",
@@ -1944,9 +1943,9 @@
QuicEncryptedPacket(encrypted_reader->FullPayload()), decryption_level,
has_decryption_key);
RecordDroppedPacketReason(DroppedPacketReason::DECRYPTION_FAILURE);
- set_detailed_error(quiche::QuicheStrCat(
- "Unable to decrypt ", EncryptionLevelToString(decryption_level),
- " payload."));
+ set_detailed_error(absl::StrCat("Unable to decrypt ",
+ EncryptionLevelToString(decryption_level),
+ " payload."));
return RaiseError(QUIC_DECRYPTION_FAILURE);
}
@@ -3712,11 +3711,10 @@
first_ack_block_underflow = true;
}
if (first_ack_block_underflow) {
- set_detailed_error(
- quiche::QuicheStrCat("Underflow with first ack block length ",
- first_block_length, " largest acked is ",
- largest_acked, ".")
- .c_str());
+ set_detailed_error(absl::StrCat("Underflow with first ack block length ",
+ first_block_length, " largest acked is ",
+ largest_acked, ".")
+ .c_str());
return false;
}
@@ -3748,11 +3746,11 @@
ack_block_underflow = true;
}
if (ack_block_underflow) {
- set_detailed_error(
- quiche::QuicheStrCat("Underflow with ack block length ",
- current_block_length, ", end of block is ",
- first_received - gap, ".")
- .c_str());
+ set_detailed_error(absl::StrCat("Underflow with ack block length ",
+ current_block_length,
+ ", end of block is ",
+ first_received - gap, ".")
+ .c_str());
return false;
}
@@ -3806,9 +3804,9 @@
if (largest_acked.ToUint64() <= delta_from_largest_observed) {
set_detailed_error(
- quiche::QuicheStrCat("delta_from_largest_observed too high: ",
- delta_from_largest_observed,
- ", largest_acked: ", largest_acked.ToUint64())
+ absl::StrCat("delta_from_largest_observed too high: ",
+ delta_from_largest_observed,
+ ", largest_acked: ", largest_acked.ToUint64())
.c_str());
return false;
}
@@ -3834,9 +3832,9 @@
}
if (largest_acked.ToUint64() <= delta_from_largest_observed) {
set_detailed_error(
- quiche::QuicheStrCat("delta_from_largest_observed too high: ",
- delta_from_largest_observed,
- ", largest_acked: ", largest_acked.ToUint64())
+ absl::StrCat("delta_from_largest_observed too high: ",
+ delta_from_largest_observed,
+ ", largest_acked: ", largest_acked.ToUint64())
.c_str());
return false;
}
@@ -3922,11 +3920,10 @@
// error if the value is wrong.
if (ack_block_value + first_sending_packet_number_.ToUint64() >
largest_acked) {
- set_detailed_error(
- quiche::QuicheStrCat("Underflow with first ack block length ",
- ack_block_value + 1, " largest acked is ",
- largest_acked, ".")
- .c_str());
+ set_detailed_error(absl::StrCat("Underflow with first ack block length ",
+ ack_block_value + 1, " largest acked is ",
+ largest_acked, ".")
+ .c_str());
return false;
}
@@ -3956,9 +3953,8 @@
// The test is written this way to detect wrap-arounds.
if ((gap_block_value + 2) > block_low) {
set_detailed_error(
- quiche::QuicheStrCat("Underflow with gap block length ",
- gap_block_value + 1,
- " previous ack block start is ", block_low, ".")
+ absl::StrCat("Underflow with gap block length ", gap_block_value + 1,
+ " previous ack block start is ", block_low, ".")
.c_str());
return false;
}
@@ -3978,9 +3974,8 @@
if (ack_block_value + first_sending_packet_number_.ToUint64() >
(block_high - 1)) {
set_detailed_error(
- quiche::QuicheStrCat("Underflow with ack block length ",
- ack_block_value + 1, " latest ack block end is ",
- block_high - 1, ".")
+ absl::StrCat("Underflow with ack block length ", ack_block_value + 1,
+ " latest ack block end is ", block_high - 1, ".")
.c_str());
return false;
}
@@ -5065,7 +5060,7 @@
type_byte = IETF_CONNECTION_CLOSE;
break;
default:
- set_detailed_error(quiche::QuicheStrCat(
+ set_detailed_error(absl::StrCat(
"Invalid QuicConnectionCloseFrame type: ",
static_cast<int>(frame.connection_close_frame->close_type)));
return RaiseError(QUIC_INTERNAL_ERROR);
@@ -6820,10 +6815,10 @@
return false;
}
if (*source_connection_id_length_out < source_connection_id.length()) {
- *detailed_error = quiche::QuicheStrCat(
- "*source_connection_id_length_out too small ",
- static_cast<int>(*source_connection_id_length_out), " < ",
- static_cast<int>(source_connection_id.length()));
+ *detailed_error =
+ absl::StrCat("*source_connection_id_length_out too small ",
+ static_cast<int>(*source_connection_id_length_out), " < ",
+ static_cast<int>(source_connection_id.length()));
return false;
}
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index a9d95b3..ba7931a 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -13,6 +13,7 @@
#include "absl/base/macros.h"
#include "absl/base/optimization.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_protocol.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_frame.h"
@@ -31,7 +32,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_server_stats.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
namespace quic {
@@ -1899,8 +1899,8 @@
return false;
}
const std::string error_details =
- quiche::QuicheStrCat("Cannot send stream data with level: ",
- EncryptionLevelToString(packet_.encryption_level));
+ absl::StrCat("Cannot send stream data with level: ",
+ EncryptionLevelToString(packet_.encryption_level));
QUIC_BUG << error_details;
delegate_->OnUnrecoverableError(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA,
error_details);
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index e2154c1..d567952 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -12,6 +12,7 @@
#include <utility>
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/crypto/null_decrypter.h"
#include "net/third_party/quiche/src/quic/core/crypto/null_encrypter.h"
@@ -32,7 +33,6 @@
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
#include "net/third_party/quiche/src/quic/test_tools/simple_data_producer.h"
#include "net/third_party/quiche/src/quic/test_tools/simple_quic_framer.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/test_tools/quiche_test_utils.h"
using testing::_;
@@ -66,9 +66,8 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(ParsedQuicVersionToString(p.version), "_",
- (p.version_serialization ? "Include" : "No"),
- "Version");
+ return absl::StrCat(ParsedQuicVersionToString(p.version), "_",
+ (p.version_serialization ? "Include" : "No"), "Version");
}
// Constructs various test permutations.
diff --git a/quic/core/quic_packets.cc b/quic/core/quic_packets.cc
index 3d6228e..e4bf322 100644
--- a/quic/core/quic_packets.cc
+++ b/quic/core/quic_packets.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "absl/strings/escaping.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/quic_connection_id.h"
#include "net/third_party/quiche/src/quic/core/quic_types.h"
@@ -15,7 +16,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_string_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
namespace quic {
@@ -574,11 +574,11 @@
ReceivedPacketInfo::~ReceivedPacketInfo() {}
std::string ReceivedPacketInfo::ToString() const {
- std::string output = quiche::QuicheStrCat(
- "{ self_address: ", self_address.ToString(),
- ", peer_address: ", peer_address.ToString(),
- ", packet_length: ", packet.length(), ", header_format: ", form,
- ", version_flag: ", version_flag);
+ std::string output =
+ absl::StrCat("{ self_address: ", self_address.ToString(),
+ ", peer_address: ", peer_address.ToString(),
+ ", packet_length: ", packet.length(),
+ ", header_format: ", form, ", version_flag: ", version_flag);
if (version_flag) {
QuicStrAppend(&output, ", version: ", ParsedQuicVersionToString(version));
}
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e60d5b9..4d7d22b 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_ack_frequency_frame.h"
#include "net/third_party/quiche/src/quic/core/quic_connection.h"
@@ -24,7 +25,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_ptr_util.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_server_stats.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_stack_trace.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using spdy::SpdyPriority;
@@ -691,7 +691,7 @@
}
std::string QuicSession::GetStreamsInfoForLogging() const {
- std::string info = quiche::QuicheStrCat(
+ std::string info = absl::StrCat(
"num_active_streams: ", GetNumActiveStreams(),
", num_pending_streams: ", pending_streams_size(),
", num_outgoing_draining_streams: ", num_outgoing_draining_streams(),
@@ -705,8 +705,8 @@
// Calculate the stream creation delay.
const QuicTime::Delta delay =
connection_->clock()->ApproximateNow() - it.second->creation_time();
- info = quiche::QuicheStrCat(
- info, "{", it.second->id(), ":", delay.ToDebuggingValue(), ";",
+ absl::StrAppend(
+ &info, "{", it.second->id(), ":", delay.ToDebuggingValue(), ";",
it.second->stream_bytes_written(), ",", it.second->fin_sent(), ",",
it.second->HasBufferedData(), ",", it.second->fin_buffered(), ";",
it.second->stream_bytes_read(), ",", it.second->fin_received(), "}");
@@ -796,7 +796,7 @@
TransmissionType type) {
DCHECK(QuicVersionUsesCryptoFrames(transport_version()));
if (!connection()->framer().HasEncrypterOfEncryptionLevel(level)) {
- const std::string error_details = quiche::QuicheStrCat(
+ const std::string error_details = absl::StrCat(
"Try to send crypto data with missing keys of encryption level: ",
EncryptionLevelToString(level));
QUIC_BUG << ENDPOINT << error_details;
@@ -1139,7 +1139,7 @@
ietf_streamid_manager_.outgoing_bidirectional_stream_count()) {
connection_->CloseConnection(
QUIC_ZERO_RTT_UNRETRANSMITTABLE,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Server rejected 0-RTT, aborting because new bidirectional "
"initial stream limit ",
max_streams, " is less than current open streams: ",
@@ -1156,7 +1156,7 @@
connection_->CloseConnection(
was_zero_rtt_rejected_ ? QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED
: QUIC_ZERO_RTT_RESUMPTION_LIMIT_REDUCED,
- quiche::QuicheStrCat(
+ absl::StrCat(
was_zero_rtt_rejected_
? "Server rejected 0-RTT, aborting because "
: "",
@@ -1181,7 +1181,7 @@
ietf_streamid_manager_.outgoing_unidirectional_stream_count()) {
connection_->CloseConnection(
QUIC_ZERO_RTT_UNRETRANSMITTABLE,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Server rejected 0-RTT, aborting because new unidirectional "
"initial stream limit ",
max_streams, " is less than current open streams: ",
@@ -1195,7 +1195,7 @@
connection_->CloseConnection(
was_zero_rtt_rejected_ ? QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED
: QUIC_ZERO_RTT_RESUMPTION_LIMIT_REDUCED,
- quiche::QuicheStrCat(
+ absl::StrCat(
was_zero_rtt_rejected_
? "Server rejected 0-RTT, aborting because "
: "",
@@ -1223,7 +1223,7 @@
max_streams < stream_id_manager_.num_open_outgoing_streams()) {
connection_->CloseConnection(
QUIC_INTERNAL_ERROR,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Server rejected 0-RTT, aborting because new stream limit ",
max_streams, " is less than current open streams: ",
stream_id_manager_.num_open_outgoing_streams()),
@@ -1526,7 +1526,7 @@
QUIC_DVLOG(1) << ENDPOINT << "OnNewSessionFlowControlWindow " << new_window;
if (was_zero_rtt_rejected_ && new_window < flow_controller_.bytes_sent()) {
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Server rejected 0-RTT. Aborting because the client received session "
"flow control send window: ",
new_window,
@@ -1539,7 +1539,7 @@
}
if (!connection_->version().AllowsLowFlowControlLimits() &&
new_window < kMinimumFlowControlSendWindow) {
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"Peer sent us an invalid session flow control send window: ",
new_window, ", below minimum: ", kMinimumFlowControlSendWindow);
QUIC_LOG_FIRST_N(ERROR, 1) << error_details;
@@ -1552,7 +1552,7 @@
new_window < flow_controller_.send_window_offset()) {
// The client receives a lower limit than remembered, violating
// https://tools.ietf.org/html/draft-ietf-quic-transport-27#section-7.3.1
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
was_zero_rtt_rejected_ ? "Server rejected 0-RTT, aborting because "
: "",
"new session max data ", new_window,
@@ -1943,8 +1943,8 @@
if (!stream_id_manager_.MaybeIncreaseLargestPeerStreamId(stream_id)) {
connection()->CloseConnection(
QUIC_TOO_MANY_AVAILABLE_STREAMS,
- quiche::QuicheStrCat(stream_id, " exceeds available streams ",
- stream_id_manager_.MaxAvailableStreams()),
+ absl::StrCat(stream_id, " exceeds available streams ",
+ stream_id_manager_.MaxAvailableStreams()),
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
return false;
}
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index 78c7b1e..675ea55 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -10,6 +10,7 @@
#include <utility>
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "net/third_party/quiche/src/quic/core/crypto/crypto_protocol.h"
@@ -39,7 +40,6 @@
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_send_buffer_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using spdy::kV3HighestPriority;
using spdy::SpdyPriority;
@@ -940,8 +940,8 @@
EXPECT_CALL(*connection_, SendControlFrame(_));
EXPECT_CALL(*connection_, OnStreamReset(closed_stream_id, _));
stream2->Reset(QUIC_BAD_APPLICATION_PAYLOAD);
- std::string msg = quiche::QuicheStrCat("Marking unknown stream ",
- closed_stream_id, " blocked.");
+ std::string msg =
+ absl::StrCat("Marking unknown stream ", closed_stream_id, " blocked.");
EXPECT_QUIC_BUG(session_.MarkConnectionLevelWriteBlocked(closed_stream_id),
msg);
}
diff --git a/quic/core/quic_stream.cc b/quic/core/quic_stream.cc
index aaef261..add2715 100644
--- a/quic/core/quic_stream.cc
+++ b/quic/core/quic_stream.cc
@@ -7,6 +7,7 @@
#include <limits>
#include <string>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
@@ -18,7 +19,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using spdy::SpdyPriority;
@@ -176,7 +176,7 @@
if (frame.offset + frame.data_length > sequencer_.close_offset()) {
OnUnrecoverableError(
QUIC_STREAM_DATA_BEYOND_CLOSE_OFFSET,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream ", id_,
" received data with offset: ", frame.offset + frame.data_length,
", which is beyond close offset: ", sequencer()->close_offset()));
@@ -224,10 +224,10 @@
frame.byte_offset != sequencer()->close_offset()) {
OnUnrecoverableError(
QUIC_STREAM_MULTIPLE_OFFSET,
- quiche::QuicheStrCat("Stream ", id_,
- " received new final offset: ", frame.byte_offset,
- ", which is different from close offset: ",
- sequencer()->close_offset()));
+ absl::StrCat("Stream ", id_,
+ " received new final offset: ", frame.byte_offset,
+ ", which is different from close offset: ",
+ sequencer()->close_offset()));
return;
}
@@ -419,17 +419,16 @@
<< sequencer_.DebugString();
OnUnrecoverableError(
QUIC_STREAM_LENGTH_OVERFLOW,
- quiche::QuicheStrCat("Peer sends more data than allowed on stream ",
- id_, ". frame: offset = ", frame.offset,
- ", length = ", frame.data_length, ". ",
- sequencer_.DebugString()));
+ absl::StrCat("Peer sends more data than allowed on stream ", id_,
+ ". frame: offset = ", frame.offset, ", length = ",
+ frame.data_length, ". ", sequencer_.DebugString()));
return;
}
if (frame.offset + frame.data_length > sequencer_.close_offset()) {
OnUnrecoverableError(
QUIC_STREAM_DATA_BEYOND_CLOSE_OFFSET,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream ", id_,
" received data with offset: ", frame.offset + frame.data_length,
", which is beyond close offset: ", sequencer_.close_offset()));
@@ -533,10 +532,10 @@
frame.byte_offset != sequencer()->close_offset()) {
OnUnrecoverableError(
QUIC_STREAM_MULTIPLE_OFFSET,
- quiche::QuicheStrCat("Stream ", id_,
- " received new final offset: ", frame.byte_offset,
- ", which is different from close offset: ",
- sequencer_.close_offset()));
+ absl::StrCat("Stream ", id_,
+ " received new final offset: ", frame.byte_offset,
+ ", which is different from close offset: ",
+ sequencer_.close_offset()));
return;
}
@@ -681,7 +680,7 @@
QUIC_BUG << "Write too many data via stream " << id_;
OnUnrecoverableError(
QUIC_STREAM_LENGTH_OVERFLOW,
- quiche::QuicheStrCat("Write too many data via stream ", id_));
+ absl::StrCat("Write too many data via stream ", id_));
return;
}
send_buffer_.SaveStreamData(&iov, 1, 0, data.length());
@@ -794,7 +793,7 @@
QUIC_BUG << "Write too many data via stream " << id_;
OnUnrecoverableError(
QUIC_STREAM_LENGTH_OVERFLOW,
- quiche::QuicheStrCat("Write too many data via stream ", id_));
+ absl::StrCat("Write too many data via stream ", id_));
return consumed_data;
}
OnDataBuffered(offset, consumed_data.bytes_consumed, nullptr);
@@ -1049,7 +1048,7 @@
<< "Server streams' flow control should never be configured twice.";
OnUnrecoverableError(
QUIC_ZERO_RTT_UNRETRANSMITTABLE,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Server rejected 0-RTT, aborting because new stream max data ",
new_offset, " for stream ", id_, " is less than currently used: ",
flow_controller_->bytes_sent()));
@@ -1063,7 +1062,7 @@
OnUnrecoverableError(
was_zero_rtt_rejected ? QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED
: QUIC_ZERO_RTT_RESUMPTION_LIMIT_REDUCED,
- quiche::QuicheStrCat(
+ absl::StrCat(
was_zero_rtt_rejected ? "Server rejected 0-RTT, aborting because "
: "",
"new stream max data ", new_offset, " decreases current limit: ",
diff --git a/quic/core/quic_stream_id_manager.cc b/quic/core/quic_stream_id_manager.cc
index 8a54e31..e6a8da9 100644
--- a/quic/core/quic_stream_id_manager.cc
+++ b/quic/core/quic_stream_id_manager.cc
@@ -6,6 +6,7 @@
#include <cstdint>
#include <string>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_connection.h"
#include "net/third_party/quiche/src/quic/core/quic_constants.h"
#include "net/third_party/quiche/src/quic/core/quic_session.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -50,7 +50,7 @@
DCHECK_EQ(frame.unidirectional, unidirectional_);
if (frame.stream_count > incoming_advertised_max_streams_) {
// Peer thinks it can send more streams that we've told it.
- *error_details = quiche::QuicheStrCat(
+ *error_details = absl::StrCat(
"StreamsBlockedFrame's stream count ", frame.stream_count,
" exceeds incoming max stream ", incoming_advertised_max_streams_);
return false;
@@ -89,10 +89,10 @@
<< "non-zero incoming stream count " << incoming_stream_count_
<< " when setting max incoming stream to " << max_open_streams;
QUIC_DLOG_IF(WARNING, incoming_initial_max_open_streams_ != max_open_streams)
- << quiche::QuicheStrCat(
- unidirectional_ ? "unidirectional " : "bidirectional: ",
- "incoming stream limit changed from ",
- incoming_initial_max_open_streams_, " to ", max_open_streams);
+ << absl::StrCat(unidirectional_ ? "unidirectional " : "bidirectional: ",
+ "incoming stream limit changed from ",
+ incoming_initial_max_open_streams_, " to ",
+ max_open_streams);
incoming_actual_max_streams_ = max_open_streams;
incoming_advertised_max_streams_ = max_open_streams;
incoming_initial_max_open_streams_ = max_open_streams;
@@ -186,9 +186,9 @@
<< "Failed to create a new incoming stream with id:"
<< stream_id << ", reaching MAX_STREAMS limit: "
<< incoming_advertised_max_streams_ << ".";
- *error_details = quiche::QuicheStrCat("Stream id ", stream_id,
- " would exceed stream count limit ",
- incoming_advertised_max_streams_);
+ *error_details = absl::StrCat("Stream id ", stream_id,
+ " would exceed stream count limit ",
+ incoming_advertised_max_streams_);
return false;
}
diff --git a/quic/core/quic_stream_id_manager.h b/quic/core/quic_stream_id_manager.h
index 9e6ef20..6304b91 100644
--- a/quic/core/quic_stream_id_manager.h
+++ b/quic/core/quic_stream_id_manager.h
@@ -4,11 +4,11 @@
#ifndef QUICHE_QUIC_CORE_QUIC_STREAM_ID_MANAGER_H_
#define QUICHE_QUIC_CORE_QUIC_STREAM_ID_MANAGER_H_
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_frame.h"
#include "net/third_party/quiche/src/quic/core/quic_types.h"
#include "net/third_party/quiche/src/quic/core/quic_versions.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -41,7 +41,7 @@
// Generate a string suitable for sending to the log/etc to show current state
// of the stream ID manager.
std::string DebugString() const {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
" { unidirectional_: ", unidirectional_,
", perspective: ", perspective_,
", outgoing_max_streams_: ", outgoing_max_streams_,
diff --git a/quic/core/quic_stream_id_manager_test.cc b/quic/core/quic_stream_id_manager_test.cc
index e95f553..cf19269 100644
--- a/quic/core/quic_stream_id_manager_test.cc
+++ b/quic/core/quic_stream_id_manager_test.cc
@@ -7,13 +7,13 @@
#include <string>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_constants.h"
#include "net/third_party/quiche/src/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quic/core/quic_versions.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_expect_bug.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_id_manager_peer.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
using testing::_;
using testing::StrictMock;
@@ -45,7 +45,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
ParsedQuicVersionToString(p.version), "_",
(p.perspective == Perspective::IS_CLIENT ? "Client" : "Server"),
(p.is_unidirectional ? "Unidirectional" : "Bidirectional"));
@@ -205,8 +205,8 @@
EXPECT_FALSE(stream_id_manager_.MaybeIncreaseLargestPeerStreamId(
stream_id, &error_details));
EXPECT_EQ(error_details,
- quiche::QuicheStrCat("Stream id ", stream_id,
- " would exceed stream count limit 100"));
+ absl::StrCat("Stream id ", stream_id,
+ " would exceed stream count limit 100"));
}
TEST_P(QuicStreamIdManagerTest, OnStreamsBlockedFrame) {
@@ -315,7 +315,7 @@
max_stream_id + QuicUtils::StreamIdDelta(transport_version()),
&error_details));
EXPECT_EQ(error_details,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream id ",
max_stream_id + QuicUtils::StreamIdDelta(transport_version()),
" would exceed stream count limit 100"));
@@ -470,8 +470,8 @@
EXPECT_FALSE(stream_id_manager_.MaybeIncreaseLargestPeerStreamId(
too_big_stream_id, &error_details));
EXPECT_EQ(error_details,
- quiche::QuicheStrCat("Stream id ", too_big_stream_id,
- " would exceed stream count limit 100"));
+ absl::StrCat("Stream id ", too_big_stream_id,
+ " would exceed stream count limit 100"));
}
} // namespace
diff --git a/quic/core/quic_stream_sequencer.cc b/quic/core/quic_stream_sequencer.cc
index 8f61264..a1861dc 100644
--- a/quic/core/quic_stream_sequencer.cc
+++ b/quic/core/quic_stream_sequencer.cc
@@ -10,6 +10,7 @@
#include <string>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/quic_clock.h"
#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
@@ -23,7 +24,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_stack_trace.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -75,9 +75,9 @@
byte_offset, absl::string_view(data_buffer, data_len), &bytes_written,
&error_details);
if (result != QUIC_NO_ERROR) {
- std::string details = quiche::QuicheStrCat("Stream ", stream_->id(), ": ",
- QuicErrorCodeToString(result),
- ": ", error_details);
+ std::string details =
+ absl::StrCat("Stream ", stream_->id(), ": ",
+ QuicErrorCodeToString(result), ": ", error_details);
QUIC_LOG_FIRST_N(WARNING, 50) << QuicErrorCodeToString(result);
QUIC_LOG_FIRST_N(WARNING, 50) << details;
stream_->OnUnrecoverableError(result, details);
@@ -125,7 +125,7 @@
if (close_offset_ != kMaxOffset && offset != close_offset_) {
stream_->OnUnrecoverableError(
QUIC_STREAM_SEQUENCER_INVALID_STATE,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream ", stream_->id(), " received new final offset: ", offset,
", which is different from close offset: ", close_offset_));
return false;
@@ -136,7 +136,7 @@
if (offset < highest_offset_) {
stream_->OnUnrecoverableError(
QUIC_STREAM_SEQUENCER_INVALID_STATE,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream ", stream_->id(), " received fin with offset: ", offset,
", which reduces current highest offset: ", highest_offset_));
return false;
@@ -202,7 +202,7 @@
buffered_frames_.Readv(iov, iov_len, &bytes_read, &error_details);
if (read_error != QUIC_NO_ERROR) {
std::string details =
- quiche::QuicheStrCat("Stream ", stream_->id(), ": ", error_details);
+ absl::StrCat("Stream ", stream_->id(), ": ", error_details);
stream_->OnUnrecoverableError(read_error, details);
return bytes_read;
}
@@ -285,7 +285,7 @@
const std::string QuicStreamSequencer::DebugString() const {
// clang-format off
- return quiche::QuicheStrCat("QuicStreamSequencer:",
+ return absl::StrCat("QuicStreamSequencer:",
"\n bytes buffered: ", NumBytesBuffered(),
"\n bytes consumed: ", NumBytesConsumed(),
"\n has bytes to read: ", HasBytesToRead() ? "true" : "false",
diff --git a/quic/core/quic_stream_sequencer_buffer.cc b/quic/core/quic_stream_sequencer_buffer.cc
index 2b641e3..c3c284e 100644
--- a/quic/core/quic_stream_sequencer_buffer.cc
+++ b/quic/core/quic_stream_sequencer_buffer.cc
@@ -9,6 +9,7 @@
#include <memory>
#include <string>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/core/quic_constants.h"
#include "net/third_party/quiche/src/quic/core/quic_interval.h"
@@ -16,7 +17,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
namespace {
@@ -225,7 +225,7 @@
}
if (write_block_num >= current_blocks_count) {
- *error_details = quiche::QuicheStrCat(
+ *error_details = absl::StrCat(
"QuicStreamSequencerBuffer error: OnStreamData() exceed array bounds."
"write offset = ",
offset, " write_block_num = ", write_block_num,
@@ -250,7 +250,7 @@
<< " length: " << bytes_to_copy;
if (dest == nullptr || source == nullptr) {
- *error_details = quiche::QuicheStrCat(
+ *error_details = absl::StrCat(
"QuicStreamSequencerBuffer error: OnStreamData()"
" dest == nullptr: ",
(dest == nullptr), " source == nullptr: ", (source == nullptr),
@@ -287,7 +287,7 @@
std::min<size_t>(bytes_available_in_block, dest_remaining);
DCHECK_GT(bytes_to_copy, 0u);
if (blocks_[block_idx] == nullptr || dest == nullptr) {
- *error_details = quiche::QuicheStrCat(
+ *error_details = absl::StrCat(
"QuicStreamSequencerBuffer error:"
" Readv() dest == nullptr: ",
(dest == nullptr), " blocks_[", block_idx,
@@ -311,7 +311,7 @@
if (bytes_to_copy == bytes_available_in_block) {
bool retire_successfully = RetireBlockIfEmpty(block_idx);
if (!retire_successfully) {
- *error_details = quiche::QuicheStrCat(
+ *error_details = absl::StrCat(
"QuicStreamSequencerBuffer error: fail to retire block ",
block_idx,
" as the block is already released, total_bytes_read_ = ",
diff --git a/quic/core/quic_stream_sequencer_buffer_test.cc b/quic/core/quic_stream_sequencer_buffer_test.cc
index 0ad7244..ec225ab 100644
--- a/quic/core/quic_stream_sequencer_buffer_test.cc
+++ b/quic/core/quic_stream_sequencer_buffer_test.cc
@@ -11,12 +11,12 @@
#include <string>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_sequencer_buffer_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -163,7 +163,7 @@
source = absl::string_view(nullptr, 1024);
EXPECT_THAT(buffer_->OnStreamData(800, source, &written_, &error_details_),
IsError(QUIC_STREAM_SEQUENCER_INVALID_STATE));
- EXPECT_EQ(0u, error_details_.find(quiche::QuicheStrCat(
+ EXPECT_EQ(0u, error_details_.find(absl::StrCat(
"QuicStreamSequencerBuffer error: OnStreamData() "
"dest == nullptr: ",
false, " source == nullptr: ", true)));
diff --git a/quic/core/quic_stream_test.cc b/quic/core/quic_stream_test.cc
index d241dac..37d0247 100644
--- a/quic/core/quic_stream_test.cc
+++ b/quic/core/quic_stream_test.cc
@@ -747,8 +747,8 @@
QuicStreamFrame stream_frame(stream_->id(), false, kMaxStreamLength, ".");
EXPECT_QUIC_PEER_BUG(
stream_->OnStreamFrame(stream_frame),
- quiche::QuicheStrCat("Receive stream frame on stream ", stream_->id(),
- " reaches max stream length"));
+ absl::StrCat("Receive stream frame on stream ", stream_->id(),
+ " reaches max stream length"));
}
TEST_P(QuicStreamTest, SetDrainingIncomingOutgoing) {
diff --git a/quic/core/quic_types.cc b/quic/core/quic_types.cc
index 9eb0a27..96531e9 100644
--- a/quic/core/quic_types.cc
+++ b/quic/core/quic_types.cc
@@ -6,8 +6,8 @@
#include <cstdint>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -24,7 +24,7 @@
if (perspective == Perspective::IS_CLIENT) {
return "IS_CLIENT";
}
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(perspective), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(perspective), ")");
}
std::ostream& operator<<(std::ostream& os, const Perspective& perspective) {
@@ -40,8 +40,8 @@
if (connection_close_source == ConnectionCloseSource::FROM_SELF) {
return "FROM_SELF";
}
- return quiche::QuicheStrCat("Unknown(",
- static_cast<int>(connection_close_source), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(connection_close_source),
+ ")");
}
std::ostream& operator<<(std::ostream& os,
@@ -59,8 +59,8 @@
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET) {
return "SEND_CONNECTION_CLOSE_PACKET";
}
- return quiche::QuicheStrCat("Unknown(",
- static_cast<int>(connection_close_behavior), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(connection_close_behavior),
+ ")");
}
std::ostream& operator<<(
@@ -155,7 +155,7 @@
RETURN_STRING_LITERAL(ACK_FREQUENCY_FRAME)
RETURN_STRING_LITERAL(NUM_FRAME_TYPES)
}
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(t), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(t), ")");
}
std::ostream& operator<<(std::ostream& os, const QuicFrameType& t) {
@@ -196,7 +196,7 @@
RETURN_STRING_LITERAL(IETF_EXTENSION_MESSAGE_NO_LENGTH_V99);
RETURN_STRING_LITERAL(IETF_EXTENSION_MESSAGE_V99);
default:
- return quiche::QuicheStrCat("Private value (", t, ")");
+ return absl::StrCat("Private value (", t, ")");
}
}
std::ostream& operator<<(std::ostream& os, const QuicIetfFrameType& c) {
@@ -219,8 +219,7 @@
if (transmission_type == LAST_TRANSMISSION_TYPE + 1) {
return "INVALID_TRANSMISSION_TYPE";
}
- return quiche::QuicheStrCat("Unknown(",
- static_cast<int>(transmission_type), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(transmission_type), ")");
break;
}
}
@@ -236,7 +235,7 @@
RETURN_STRING_LITERAL(IETF_QUIC_SHORT_HEADER_PACKET);
RETURN_STRING_LITERAL(GOOGLE_QUIC_PACKET);
default:
- return quiche::QuicheStrCat("Unknown (", static_cast<int>(format), ")");
+ return absl::StrCat("Unknown (", static_cast<int>(format), ")");
}
}
@@ -249,7 +248,7 @@
RETURN_STRING_LITERAL(RETRY);
RETURN_STRING_LITERAL(INVALID_PACKET_TYPE);
default:
- return quiche::QuicheStrCat("Unknown (", static_cast<int>(type), ")");
+ return absl::StrCat("Unknown (", static_cast<int>(type), ")");
}
}
@@ -262,19 +261,17 @@
RETURN_STRING_LITERAL(MESSAGE_STATUS_TOO_LARGE);
RETURN_STRING_LITERAL(MESSAGE_STATUS_INTERNAL_ERROR);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(message_status),
- ")");
+ return absl::StrCat("Unknown(", static_cast<int>(message_status), ")");
break;
}
}
std::string MessageResultToString(MessageResult message_result) {
if (message_result.status != MESSAGE_STATUS_SUCCESS) {
- return quiche::QuicheStrCat(
- "{", MessageStatusToString(message_result.status), "}");
+ return absl::StrCat("{", MessageStatusToString(message_result.status), "}");
}
- return quiche::QuicheStrCat(
- "{MESSAGE_STATUS_SUCCESS,id=", message_result.message_id, "}");
+ return absl::StrCat("{MESSAGE_STATUS_SUCCESS,id=", message_result.message_id,
+ "}");
}
std::ostream& operator<<(std::ostream& os, const MessageResult& mr) {
@@ -288,8 +285,8 @@
RETURN_STRING_LITERAL(HANDSHAKE_DATA);
RETURN_STRING_LITERAL(APPLICATION_DATA);
default:
- return quiche::QuicheStrCat("Unknown(",
- static_cast<int>(packet_number_space), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(packet_number_space),
+ ")");
break;
}
}
@@ -301,7 +298,7 @@
RETURN_STRING_LITERAL(SEND_TO_WRITER);
RETURN_STRING_LITERAL(LEGACY_VERSION_ENCAPSULATE);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(fate), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(fate), ")");
}
}
@@ -317,7 +314,7 @@
RETURN_STRING_LITERAL(ENCRYPTION_ZERO_RTT);
RETURN_STRING_LITERAL(ENCRYPTION_FORWARD_SECURE);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(level), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(level), ")");
break;
}
}
@@ -333,7 +330,7 @@
RETURN_STRING_LITERAL(IETF_QUIC_TRANSPORT_CONNECTION_CLOSE);
RETURN_STRING_LITERAL(IETF_QUIC_APPLICATION_CONNECTION_CLOSE);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(type), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(type), ")");
break;
}
}
@@ -354,7 +351,7 @@
RETURN_STRING_LITERAL(IPV6_TO_IPV4_CHANGE);
RETURN_STRING_LITERAL(IPV6_TO_IPV6_CHANGE);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<IntType>(type), ")");
+ return absl::StrCat("Unknown(", static_cast<IntType>(type), ")");
}
}
@@ -375,7 +372,7 @@
RETURN_REASON_LITERAL(kLocalAeadConfidentialityLimit);
RETURN_REASON_LITERAL(kLocalKeyUpdateLimitOverride);
default:
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(reason), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(reason), ")");
break;
}
#undef RETURN_REASON_LITERAL
diff --git a/quic/core/quic_unacked_packet_map.h b/quic/core/quic_unacked_packet_map.h
index 33b7bba..5c975cd 100644
--- a/quic/core/quic_unacked_packet_map.h
+++ b/quic/core/quic_unacked_packet_map.h
@@ -9,13 +9,13 @@
#include <cstdint>
#include <deque>
+#include "absl/strings/str_cat.h"
#include "net/third_party/quiche/src/quic/core/quic_circular_deque.h"
#include "net/third_party/quiche/src/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/quic/core/quic_transmission_info.h"
#include "net/third_party/quiche/src/quic/core/session_notifier_interface.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -318,7 +318,7 @@
}
std::string DebugString() const {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
"{size: ", unacked_packets_size(),
", least_unacked: ", least_unacked_.ToString(),
", largest_sent_packet: ", largest_sent_packet_.ToString(),
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc
index b70d335..9f71bbb 100644
--- a/quic/core/quic_versions.cc
+++ b/quic/core/quic_versions.cc
@@ -8,6 +8,7 @@
#include "absl/base/macros.h"
#include "absl/strings/numbers.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "net/third_party/quiche/src/quic/core/crypto/quic_random.h"
#include "net/third_party/quiche/src/quic/core/quic_tag.h"
@@ -16,7 +17,6 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
#include "net/third_party/quiche/src/common/quiche_endian.h"
@@ -484,8 +484,8 @@
RETURN_STRING_LITERAL(QUIC_VERSION_UNSUPPORTED);
RETURN_STRING_LITERAL(QUIC_VERSION_RESERVED_FOR_NEGOTIATION);
}
- return quiche::QuicheStrCat("QUIC_VERSION_UNKNOWN(",
- static_cast<int>(transport_version), ")");
+ return absl::StrCat("QUIC_VERSION_UNKNOWN(",
+ static_cast<int>(transport_version), ")");
}
std::string HandshakeProtocolToString(HandshakeProtocol handshake_protocol) {
@@ -494,8 +494,8 @@
RETURN_STRING_LITERAL(PROTOCOL_QUIC_CRYPTO);
RETURN_STRING_LITERAL(PROTOCOL_TLS1_3);
}
- return quiche::QuicheStrCat("PROTOCOL_UNKNOWN(",
- static_cast<int>(handshake_protocol), ")");
+ return absl::StrCat("PROTOCOL_UNKNOWN(", static_cast<int>(handshake_protocol),
+ ")");
}
std::string ParsedQuicVersionToString(ParsedQuicVersion version) {
diff --git a/quic/core/tls_chlo_extractor.cc b/quic/core/tls_chlo_extractor.cc
index 06ed1c8..27f44d3 100644
--- a/quic/core/tls_chlo_extractor.cc
+++ b/quic/core/tls_chlo_extractor.cc
@@ -6,6 +6,7 @@
#include <cstring>
#include <memory>
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
#include "net/third_party/quiche/src/quic/core/frames/quic_crypto_frame.h"
@@ -16,7 +17,6 @@
#include "net/third_party/quiche/src/quic/core/quic_types.h"
#include "net/third_party/quiche/src/quic/core/quic_versions.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
namespace quic {
@@ -138,7 +138,7 @@
// error that will prevent it from reassembling the crypto stream data.
void TlsChloExtractor::OnUnrecoverableError(QuicErrorCode error,
const std::string& details) {
- HandleUnrecoverableError(quiche::QuicheStrCat(
+ HandleUnrecoverableError(absl::StrCat(
"Crypto stream error ", QuicErrorCodeToString(error), ": ", details));
}
@@ -232,7 +232,7 @@
void TlsChloExtractor::HandleUnexpectedCallback(
const std::string& callback_name) {
std::string error_details =
- quiche::QuicheStrCat("Unexpected callback ", callback_name);
+ absl::StrCat("Unexpected callback ", callback_name);
QUIC_BUG << error_details;
HandleUnrecoverableError(error_details);
}
@@ -252,7 +252,7 @@
// try to send this alert to tell the client that the handshake failed.
return;
}
- HandleUnrecoverableError(quiche::QuicheStrCat(
+ HandleUnrecoverableError(absl::StrCat(
"BoringSSL attempted to send alert ", static_cast<int>(tls_alert_value),
" ", SSL_alert_desc_string_long(tls_alert_value)));
}
@@ -365,7 +365,7 @@
if (error_details_.empty()) {
error_details_ = error_details;
} else {
- error_details_ = quiche::QuicheStrCat(error_details_, "; ", error_details);
+ error_details_ = absl::StrCat(error_details_, "; ", error_details);
}
}
@@ -383,7 +383,7 @@
case State::kUnrecoverableFailure:
return "UnrecoverableFailure";
}
- return quiche::QuicheStrCat("Unknown(", static_cast<int>(state), ")");
+ return absl::StrCat("Unknown(", static_cast<int>(state), ")");
}
std::ostream& operator<<(std::ostream& os,
diff --git a/quic/core/tls_handshaker.cc b/quic/core/tls_handshaker.cc
index bfe3545..c998d38 100644
--- a/quic/core/tls_handshaker.cc
+++ b/quic/core/tls_handshaker.cc
@@ -5,13 +5,13 @@
#include "net/third_party/quiche/src/quic/core/tls_handshaker.h"
#include "absl/base/macros.h"
+#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "third_party/boringssl/src/include/openssl/crypto.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
#include "net/third_party/quiche/src/quic/core/quic_crypto_stream.h"
#include "net/third_party/quiche/src/quic/core/tls_client_handshaker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_str_cat.h"
namespace quic {
@@ -296,7 +296,7 @@
// (draft-ietf-quic-transport-27, section 20). However, according to
// quic_error_codes.h, this QUIC implementation only sends 1-byte error codes
// right now.
- std::string error_details = quiche::QuicheStrCat(
+ std::string error_details = absl::StrCat(
"TLS handshake failure (", EncryptionLevelToString(level), ") ",
static_cast<int>(desc), ": ", SSL_alert_desc_string_long(desc));
QUIC_DLOG(ERROR) << error_details;
diff --git a/quic/core/tls_server_handshaker_test.cc b/quic/core/tls_server_handshaker_test.cc
index 7411ba2..9b1e389 100644
--- a/quic/core/tls_server_handshaker_test.cc
+++ b/quic/core/tls_server_handshaker_test.cc
@@ -49,7 +49,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
ParsedQuicVersionToString(p.version), "_",
(p.disable_resumption ? "ResumptionDisabled" : "ResumptionEnabled"));
}
diff --git a/quic/core/uber_quic_stream_id_manager_test.cc b/quic/core/uber_quic_stream_id_manager_test.cc
index 705a395..7f3234f 100644
--- a/quic/core/uber_quic_stream_id_manager_test.cc
+++ b/quic/core/uber_quic_stream_id_manager_test.cc
@@ -27,7 +27,7 @@
// Used by ::testing::PrintToStringParamName().
std::string PrintToString(const TestParams& p) {
- return quiche::QuicheStrCat(
+ return absl::StrCat(
ParsedQuicVersionToString(p.version), "_",
(p.perspective == Perspective::IS_CLIENT ? "client" : "server"));
}
@@ -203,16 +203,16 @@
EXPECT_FALSE(manager_.MaybeIncreaseLargestPeerStreamId(
GetNthPeerInitiatedUnidirectionalStreamId(i), &error_details));
EXPECT_EQ(error_details,
- quiche::QuicheStrCat(
+ absl::StrCat(
"Stream id ", GetNthPeerInitiatedUnidirectionalStreamId(i),
" would exceed stream count limit ", kNumMaxIncomingStreams));
EXPECT_FALSE(manager_.MaybeIncreaseLargestPeerStreamId(
GetNthPeerInitiatedBidirectionalStreamId(i + 1), &error_details));
- EXPECT_EQ(
- error_details,
- quiche::QuicheStrCat(
- "Stream id ", GetNthPeerInitiatedBidirectionalStreamId(i + 1),
- " would exceed stream count limit ", kNumMaxIncomingStreams + 1));
+ EXPECT_EQ(error_details,
+ absl::StrCat("Stream id ",
+ GetNthPeerInitiatedBidirectionalStreamId(i + 1),
+ " would exceed stream count limit ",
+ kNumMaxIncomingStreams + 1));
}
TEST_P(UberQuicStreamIdManagerTest, GetNextOutgoingStreamId) {