Remove SpdyStrAppend, SpdyHexEncodeUInt32AndTrim, SpdyStringPieceCaseHash, and SpdyStringPieceCaseEq from spdy/platform.
SpdyStrAppend and SpdyHexEncodeUInt32AndTrim can now be inlined, and call sites
simplified to avoid nested StrCat/StrAppend. Also change some stray
std::string::append(StrCat) to StrAppend.
SpdyStringPieceCaseHash and SpdyStringPieceCaseEq have such simple
implementations that it is not worth to platformize them, especially given that
only the internal implementation can delegate to an existing library
(internal-only, see b/157743370), Chromium and Envoy both have to implement
them:
https://source.chromium.org/chromium/chromium/src/+/master:net/spdy/platform/impl/spdy_string_utils_impl.h
https://github.com/envoyproxy/envoy/blob/1d1b708c7bf6efa02c41d9ce22cbf1e4a1aeec2c/source/extensions/quic_listeners/quiche/platform/spdy_string_utils_impl.h#L52-L63
PiperOrigin-RevId: 364834100
Change-Id: I70f95182b3fd7e97b19248de4512cea443a3ffdb
diff --git a/spdy/core/spdy_header_block.cc b/spdy/core/spdy_header_block.cc
index 93ae28f..59a9069 100644
--- a/spdy/core/spdy_header_block.cc
+++ b/spdy/core/spdy_header_block.cc
@@ -9,9 +9,9 @@
#include <algorithm>
#include <utility>
+#include "absl/strings/str_cat.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
#include "spdy/platform/api/spdy_logging.h"
-#include "spdy/platform/api/spdy_string_utils.h"
namespace spdy {
namespace {
@@ -223,9 +223,9 @@
std::string output = "\n{\n";
for (auto it = begin(); it != end(); ++it) {
- SpdyStrAppend(&output, " ", it->first, " ", it->second, "\n");
+ absl::StrAppend(&output, " ", it->first, " ", it->second, "\n");
}
- SpdyStrAppend(&output, "}\n");
+ absl::StrAppend(&output, "}\n");
return output;
}