Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1487)

Unified Diff: net/quic/core/quic_headers_stream.cc

Issue 2591143003: Add QuicStrCat. (Closed)
Patch Set: sync Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_flow_controller_test.cc ('k') | net/quic/core/quic_headers_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_headers_stream.cc
diff --git a/net/quic/core/quic_headers_stream.cc b/net/quic/core/quic_headers_stream.cc
index 21f4c5e3d60783ed2e6d454e7d08c3cda30be62c..63538755bba678e57829439420f86091abd77c38 100644
--- a/net/quic/core/quic_headers_stream.cc
+++ b/net/quic/core/quic_headers_stream.cc
@@ -19,6 +19,7 @@
#include "net/quic/core/quic_server_session_base.h"
#include "net/quic/core/quic_spdy_session.h"
#include "net/quic/core/quic_time.h"
+#include "net/quic/platform/api/quic_str_cat.h"
#include "net/spdy/spdy_protocol.h"
using base::StringPiece;
@@ -149,9 +150,9 @@ class QuicHeadersStream::SpdyFramerVisitor
}
void OnError(SpdyFramer* framer) override {
- CloseConnection(base::StringPrintf(
- "SPDY framing error: %s",
- SpdyFramer::ErrorCodeToString(framer->error_code())));
+ CloseConnection(
+ QuicStrCat("SPDY framing error: ",
+ SpdyFramer::ErrorCodeToString(framer->error_code())));
}
void OnDataFrameHeader(SpdyStreamId stream_id,
@@ -182,15 +183,15 @@ class QuicHeadersStream::SpdyFramerVisitor
stream_->session()->perspective() == Perspective::IS_SERVER) {
// See rfc7540, Section 6.5.2.
if (value > 1) {
- CloseConnection("Invalid value for SETTINGS_ENABLE_PUSH: " +
- base::IntToString(value));
+ CloseConnection(
+ QuicStrCat("Invalid value for SETTINGS_ENABLE_PUSH: ", value));
return;
}
stream_->UpdateEnableServerPush(value > 0);
break;
} else {
- CloseConnection("Unsupported field of HTTP/2 SETTINGS frame: " +
- base::IntToString(id));
+ CloseConnection(
+ QuicStrCat("Unsupported field of HTTP/2 SETTINGS frame: ", id));
}
break;
// TODO(fayang): Need to support SETTINGS_MAX_HEADER_LIST_SIZE when
@@ -200,8 +201,8 @@ class QuicHeadersStream::SpdyFramerVisitor
break;
}
default:
- CloseConnection("Unsupported field of HTTP/2 SETTINGS frame: " +
- base::IntToString(id));
+ CloseConnection(
+ QuicStrCat("Unsupported field of HTTP/2 SETTINGS frame: ", id));
}
}
« no previous file with comments | « net/quic/core/quic_flow_controller_test.cc ('k') | net/quic/core/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698