| Index: net/quic/test_tools/quic_test_utils.cc
|
| diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
|
| index dd415264d6e4fa704b5f0a7b27814c552cb0c7f6..79781a7aebe293b3bc1ccf3d7100c88af2c87f39 100644
|
| --- a/net/quic/test_tools/quic_test_utils.cc
|
| +++ b/net/quic/test_tools/quic_test_utils.cc
|
| @@ -5,6 +5,7 @@
|
| #include "net/quic/test_tools/quic_test_utils.h"
|
|
|
| #include "base/stl_util.h"
|
| +#include "base/strings/string_number_conversions.h"
|
| #include "net/quic/crypto/crypto_framer.h"
|
| #include "net/quic/crypto/crypto_handshake.h"
|
| #include "net/quic/crypto/crypto_utils.h"
|
| @@ -386,6 +387,18 @@ void CompareCharArraysWithHexError(
|
| << HexDumpWithMarks(actual, actual_len, marks.get(), max_len);
|
| }
|
|
|
| +bool DecodeHexString(const base::StringPiece& hex, std::string* bytes) {
|
| + bytes->clear();
|
| + if (hex.empty())
|
| + return true;
|
| + std::vector<uint8> v;
|
| + if (!base::HexStringToBytes(hex.as_string(), &v))
|
| + return false;
|
| + if (!v.empty())
|
| + bytes->assign(reinterpret_cast<const char*>(&v[0]), v.size());
|
| + return true;
|
| +}
|
| +
|
| static QuicPacket* ConstructPacketFromHandshakeMessage(
|
| QuicGuid guid,
|
| const CryptoHandshakeMessage& message,
|
|
|