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

Unified Diff: net/spdy/fuzzing/hpack_fuzz_util.h

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/fuzzing/hpack_example_generator.cc ('k') | net/spdy/fuzzing/hpack_fuzz_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/fuzzing/hpack_fuzz_util.h
diff --git a/net/spdy/fuzzing/hpack_fuzz_util.h b/net/spdy/fuzzing/hpack_fuzz_util.h
index 9f1a991688fb9479d59b84dad802089e49b02344..163b8b9e067c7ea58b8c58f6c0b5c6d17d87a99b 100644
--- a/net/spdy/fuzzing/hpack_fuzz_util.h
+++ b/net/spdy/fuzzing/hpack_fuzz_util.h
@@ -9,12 +9,12 @@
#include <stdint.h>
#include <memory>
-#include <string>
#include <vector>
#include "net/base/net_export.h"
#include "net/spdy/hpack/hpack_decoder.h"
#include "net/spdy/hpack/hpack_encoder.h"
+#include "net/spdy/platform/api/spdy_string.h"
#include "net/spdy/platform/api/spdy_string_piece.h"
namespace net {
@@ -26,8 +26,8 @@ class NET_EXPORT_PRIVATE HpackFuzzUtil {
struct NET_EXPORT_PRIVATE GeneratorContext {
GeneratorContext();
~GeneratorContext();
- std::vector<std::string> names;
- std::vector<std::string> values;
+ std::vector<SpdyString> names;
+ std::vector<SpdyString> values;
};
// Initializes a GeneratorContext with a random seed and name/value fixtures.
@@ -40,7 +40,7 @@ class NET_EXPORT_PRIVATE HpackFuzzUtil {
// upper-bounded by |sanity_bound|.
static size_t SampleExponential(size_t mean, size_t sanity_bound);
- // Holds an input string, and manages an offset into that string.
+ // Holds an input SpdyString, and manages an offset into that SpdyString.
struct NET_EXPORT_PRIVATE Input {
Input(); // Initializes |offset| to zero.
~Input();
@@ -52,7 +52,7 @@ class NET_EXPORT_PRIVATE HpackFuzzUtil {
return input.data() + offset;
}
- std::string input;
+ SpdyString input;
size_t offset;
};
@@ -62,7 +62,7 @@ class NET_EXPORT_PRIVATE HpackFuzzUtil {
// Returns the serialized header block length prefix for a block of
// |block_size| bytes.
- static std::string HeaderBlockPrefix(size_t block_size);
+ static SpdyString HeaderBlockPrefix(size_t block_size);
// A FuzzerContext holds fuzzer input, as well as each of the decoder and
// encoder stages which fuzzed header blocks are processed through.
« no previous file with comments | « net/spdy/fuzzing/hpack_example_generator.cc ('k') | net/spdy/fuzzing/hpack_fuzz_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698