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

Unified Diff: net/spdy/fuzzing/hpack_fuzz_util.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/fuzzing/hpack_fuzz_util.h ('k') | net/spdy/fuzzing/hpack_fuzz_util_test.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.cc
diff --git a/net/spdy/fuzzing/hpack_fuzz_util.cc b/net/spdy/fuzzing/hpack_fuzz_util.cc
index 75b03a3d604ef64a448aac4337e4c066d69e7c8e..90b633ea60b46b7b722baee1bc4a935223fc462f 100644
--- a/net/spdy/fuzzing/hpack_fuzz_util.cc
+++ b/net/spdy/fuzzing/hpack_fuzz_util.cc
@@ -33,7 +33,6 @@ const size_t kValueLengthMax = 75;
using base::RandBytesAsString;
using std::map;
-using std::string;
HpackFuzzUtil::GeneratorContext::GeneratorContext() {}
HpackFuzzUtil::GeneratorContext::~GeneratorContext() {}
@@ -82,7 +81,7 @@ SpdyHeaderBlock HpackFuzzUtil::NextGeneratedHeaderSet(
kHeaderIndexMax);
size_t value_index = SampleExponential(kHeaderIndexMean,
kHeaderIndexMax);
- string name, value;
+ SpdyString name, value;
if (name_index >= context->names.size()) {
context->names.push_back(
RandBytesAsString(1 + SampleExponential(kNameLengthMean,
@@ -132,9 +131,9 @@ bool HpackFuzzUtil::NextHeaderBlock(Input* input, SpdyStringPiece* out) {
}
// static
-string HpackFuzzUtil::HeaderBlockPrefix(size_t block_size) {
+SpdyString HpackFuzzUtil::HeaderBlockPrefix(size_t block_size) {
uint32_t length = base::HostToNet32(static_cast<uint32_t>(block_size));
- return string(reinterpret_cast<char*>(&length), sizeof(uint32_t));
+ return SpdyString(reinterpret_cast<char*>(&length), sizeof(uint32_t));
}
// static
@@ -157,7 +156,7 @@ bool HpackFuzzUtil::RunHeaderBlockThroughFuzzerStages(
return false;
}
// Second stage: Re-encode the decoded header block. This must succeed.
- string second_stage_out;
+ SpdyString second_stage_out;
CHECK(context->second_stage->EncodeHeaderSet(
context->first_stage->decoded_block(), &second_stage_out));
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util.h ('k') | net/spdy/fuzzing/hpack_fuzz_util_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698