| Index: net/quic/core/quic_connection.cc
|
| diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
|
| index 78220209e104c4cad952b89ec2a637575b4045ad..45dcd6b355acb1b54aaa9005b70b4340a6257a6c 100644
|
| --- a/net/quic/core/quic_connection.cc
|
| +++ b/net/quic/core/quic_connection.cc
|
| @@ -36,6 +36,7 @@
|
| #include "net/quic/core/quic_pending_retransmission.h"
|
| #include "net/quic/core/quic_sent_packet_manager.h"
|
| #include "net/quic/core/quic_utils.h"
|
| +#include "net/quic/platform/api/quic_str_cat.h"
|
|
|
| using base::StringPiece;
|
| using base::StringPrintf;
|
| @@ -536,10 +537,10 @@ void QuicConnection::OnVersionNegotiationPacket(
|
| if (!SelectMutualVersion(packet.versions)) {
|
| CloseConnection(
|
| QUIC_INVALID_VERSION,
|
| - "No common version found. Supported versions: {" +
|
| - QuicVersionVectorToString(framer_.supported_versions()) +
|
| - "}, peer supported versions: {" +
|
| - QuicVersionVectorToString(packet.versions) + "}",
|
| + QuicStrCat("No common version found. Supported versions: {",
|
| + QuicVersionVectorToString(framer_.supported_versions()),
|
| + "}, peer supported versions: {",
|
| + QuicVersionVectorToString(packet.versions), "}"),
|
| ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
|
| return;
|
| }
|
| @@ -1373,9 +1374,8 @@ bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) {
|
| // Packets should have the version flag till version negotiation is
|
| // done.
|
| string error_details =
|
| - StringPrintf("%s Packet %" PRIu64
|
| - " without version flag before version negotiated.",
|
| - ENDPOINT, header.packet_number);
|
| + QuicStrCat(ENDPOINT, "Packet ", header.packet_number,
|
| + " without version flag before version negotiated.");
|
| DLOG(WARNING) << error_details;
|
| CloseConnection(QUIC_INVALID_VERSION, error_details,
|
| ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
|
| @@ -1694,9 +1694,8 @@ void QuicConnection::OnWriteError(int error_code) {
|
| }
|
| write_error_occured_ = true;
|
|
|
| - const string error_details = "Write failed with error: " +
|
| - base::IntToString(error_code) + " (" +
|
| - ErrorToString(error_code) + ")";
|
| + const string error_details = QuicStrCat(
|
| + "Write failed with error: ", error_code, " (", strerror(error_code), ")");
|
| DVLOG(1) << ENDPOINT << error_details;
|
| // We can't send an error as the socket is presumably borked.
|
| switch (error_code) {
|
|
|