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

Unified Diff: net/quic/core/crypto/crypto_framer.cc

Issue 2591143003: Add QuicStrCat. (Closed)
Patch Set: correct quic_client_bin.cc 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
Index: net/quic/core/crypto/crypto_framer.cc
diff --git a/net/quic/core/crypto/crypto_framer.cc b/net/quic/core/crypto/crypto_framer.cc
index c24c72dbef4cae9f38994c26a4b712c5601e92b7..3dc762f5f2d96ed8d321c24a62e55f1b250c296e 100644
--- a/net/quic/core/crypto/crypto_framer.cc
+++ b/net/quic/core/crypto/crypto_framer.cc
@@ -212,7 +212,7 @@ QuicErrorCode CryptoFramer::Process(StringPiece input) {
}
reader.ReadUInt16(&num_entries_);
if (num_entries_ > kMaxEntries) {
- error_detail_ = base::StringPrintf("%u entries", num_entries_);
+ error_detail_ = QuicStrCat(num_entries_, " entries");
return QUIC_CRYPTO_TOO_MANY_ENTRIES;
}
uint16_t padding;
@@ -233,10 +233,10 @@ QuicErrorCode CryptoFramer::Process(StringPiece input) {
reader.ReadUInt32(&tag);
if (i > 0 && tag <= tags_and_lengths_[i - 1].first) {
if (tag == tags_and_lengths_[i - 1].first) {
- error_detail_ = base::StringPrintf("Duplicate tag:%u", tag);
+ error_detail_ = QuicStrCat("Duplicate tag:", tag);
return QUIC_CRYPTO_DUPLICATE_TAG;
}
- error_detail_ = base::StringPrintf("Tag %u out of order", tag);
+ error_detail_ = QuicStrCat("Tag ", tag, " out of order");
return QUIC_CRYPTO_TAGS_OUT_OF_ORDER;
}
@@ -244,8 +244,8 @@ QuicErrorCode CryptoFramer::Process(StringPiece input) {
reader.ReadUInt32(&end_offset);
if (end_offset < last_end_offset) {
- error_detail_ = base::StringPrintf("End offset: %u vs %u", end_offset,
- last_end_offset);
+ error_detail_ =
+ QuicStrCat("End offset: ", end_offset, " vs ", last_end_offset);
return QUIC_CRYPTO_TAGS_OUT_OF_ORDER;
}
tags_and_lengths_.push_back(std::make_pair(

Powered by Google App Engine
This is Rietveld 408576698