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

Unified Diff: net/tools/quic/quic_packet_printer_bin.cc

Issue 2603723002: Add a new QUIC platform API for text utilities. (Closed)
Patch Set: Tests 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/tools/quic/quic_packet_printer_bin.cc
diff --git a/net/tools/quic/quic_packet_printer_bin.cc b/net/tools/quic/quic_packet_printer_bin.cc
index 1ce089b764f6bc0f4befe9128bb974027cf2ac79..84161f34c8dd8276e6b9e3245ed482067713ad34 100644
--- a/net/tools/quic/quic_packet_printer_bin.cc
+++ b/net/tools/quic/quic_packet_printer_bin.cc
@@ -36,10 +36,9 @@
#include <string>
#include "base/command_line.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
#include "net/quic/core/quic_framer.h"
#include "net/quic/core/quic_utils.h"
+#include "net/quic/platform/api/quic_text_utils.h"
using std::cerr;
using std::string;
@@ -103,7 +102,7 @@ class QuicPacketPrinter : public QuicFramerVisitorInterface {
bool OnStreamFrame(const QuicStreamFrame& frame) override {
cerr << "OnStreamFrame: " << frame;
cerr << " data: { "
- << QuicUtils::HexEncode(frame.data_buffer, frame.data_length)
+ << QuicTextUtils::HexEncode(frame.data_buffer, frame.data_length)
<< " }\n";
return true;
}
@@ -181,7 +180,7 @@ int main(int argc, char* argv[]) {
<< " Usage: " << args[0] << " client|server <hex>\n";
return 1;
}
- string hex = net::QuicUtils::HexDecode(ArgToString(args[1]));
+ string hex = net::QuicTextUtils::HexDecode(argv[2]);
net::QuicVersionVector versions = net::AllSupportedVersions();
// Fake a time since we're not actually generating acks.
net::QuicTime start(net::QuicTime::Zero());

Powered by Google App Engine
This is Rietveld 408576698