| Index: net/quic/core/quic_utils.cc
|
| diff --git a/net/quic/core/quic_utils.cc b/net/quic/core/quic_utils.cc
|
| index e0e69b6973c0fbe69ecd5b6ff12ec32ada0e0b6e..cf516126e8592b1afda3fef4dc60431a536ea66e 100644
|
| --- a/net/quic/core/quic_utils.cc
|
| +++ b/net/quic/core/quic_utils.cc
|
| @@ -12,9 +12,6 @@
|
|
|
| #include "base/containers/adapters.h"
|
| #include "base/logging.h"
|
| -#include "base/strings/string_number_conversions.h"
|
| -#include "base/strings/string_split.h"
|
| -#include "base/strings/stringprintf.h"
|
| #include "net/quic/core/quic_constants.h"
|
| #include "net/quic/core/quic_flags.h"
|
|
|
| @@ -228,56 +225,4 @@ PeerAddressChangeType QuicUtils::DetermineAddressChangeType(
|
| return IPV4_TO_IPV4_CHANGE;
|
| }
|
|
|
| -string QuicUtils::HexEncode(const char* data, size_t length) {
|
| - return HexEncode(StringPiece(data, length));
|
| -}
|
| -
|
| -string QuicUtils::HexEncode(StringPiece data) {
|
| - return ::base::HexEncode(data.data(), data.size());
|
| -}
|
| -
|
| -string QuicUtils::HexDecode(StringPiece data) {
|
| - if (data.empty())
|
| - return "";
|
| - std::vector<uint8_t> v;
|
| - if (!base::HexStringToBytes(data.as_string(), &v))
|
| - return "";
|
| - string out;
|
| - if (!v.empty())
|
| - out.assign(reinterpret_cast<const char*>(&v[0]), v.size());
|
| - return out;
|
| -}
|
| -
|
| -string QuicUtils::HexDump(StringPiece binary_input) {
|
| - int offset = 0;
|
| - const int kBytesPerLine = 16; // Max bytes dumped per line
|
| - const char* buf = binary_input.data();
|
| - int bytes_remaining = binary_input.size();
|
| - string s; // our output
|
| - const char* p = buf;
|
| - while (bytes_remaining > 0) {
|
| - const int line_bytes = std::min(bytes_remaining, kBytesPerLine);
|
| - base::StringAppendF(&s, "0x%04x: ", offset); // Do the line header
|
| - for (int i = 0; i < kBytesPerLine; ++i) {
|
| - if (i < line_bytes) {
|
| - base::StringAppendF(&s, "%02x", static_cast<unsigned char>(p[i]));
|
| - } else {
|
| - s += " "; // two-space filler instead of two-space hex digits
|
| - }
|
| - if (i % 2)
|
| - s += ' ';
|
| - }
|
| - s += ' ';
|
| - for (int i = 0; i < line_bytes; ++i) { // Do the ASCII dump
|
| - s += (p[i] > 32 && p[i] < 127) ? p[i] : '.';
|
| - }
|
| -
|
| - bytes_remaining -= line_bytes;
|
| - offset += line_bytes;
|
| - p += line_bytes;
|
| - s += '\n';
|
| - }
|
| - return s;
|
| -}
|
| -
|
| } // namespace net
|
|
|