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

Unified Diff: net/spdy/fuzzing/hpack_example_generator.cc

Issue 2801603003: Add SpdyString alias for std::string in net/spdy. (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/fuzzing/hpack_fuzz_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/fuzzing/hpack_example_generator.cc
diff --git a/net/spdy/fuzzing/hpack_example_generator.cc b/net/spdy/fuzzing/hpack_example_generator.cc
index e73681bf40010b9973d1bb76f8d9379c53550ec1..ba6e43fcbe5048fc69909f17dc3822e6b1be645a 100644
--- a/net/spdy/fuzzing/hpack_example_generator.cc
+++ b/net/spdy/fuzzing/hpack_example_generator.cc
@@ -10,6 +10,7 @@
#include "net/spdy/fuzzing/hpack_fuzz_util.h"
#include "net/spdy/hpack/hpack_constants.h"
#include "net/spdy/hpack/hpack_encoder.h"
+#include "net/spdy/platform/api/spdy_string.h"
#include "net/spdy/spdy_protocol.h"
namespace {
@@ -23,8 +24,8 @@ const char kExampleCount[] = "example-count";
} // namespace
using net::HpackFuzzUtil;
+using net::SpdyString;
using std::map;
-using std::string;
// Generates a configurable number of header sets (using HpackFuzzUtil), and
// sequentially encodes each header set with an HpackEncoder. Encoded header
@@ -43,7 +44,7 @@ int main(int argc, char** argv) {
<< " --" << kExampleCount << "=1000";
return -1;
}
- string file_to_write = command_line.GetSwitchValueASCII(kFileToWrite);
+ SpdyString file_to_write = command_line.GetSwitchValueASCII(kFileToWrite);
int example_count = 0;
base::StringToInt(command_line.GetSwitchValueASCII(kExampleCount),
@@ -62,10 +63,10 @@ int main(int argc, char** argv) {
net::SpdyHeaderBlock headers =
HpackFuzzUtil::NextGeneratedHeaderSet(&context);
- string buffer;
+ SpdyString buffer;
CHECK(encoder.EncodeHeaderSet(headers, &buffer));
- string prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size());
+ SpdyString prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size());
CHECK_LT(0, file_out.WriteAtCurrentPos(prefix.data(), prefix.size()));
CHECK_LT(0, file_out.WriteAtCurrentPos(buffer.data(), buffer.size()));
« no previous file with comments | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/fuzzing/hpack_fuzz_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698