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

Side by Side Diff: net/spdy/fuzzing/hpack_fuzz_util.h

Issue 1263803002: Replace SpdyNameValueBlock typedef with SpdyHeaderBlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_ 5 #ifndef NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_
6 #define NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_ 6 #define NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 GeneratorContext(); 24 GeneratorContext();
25 ~GeneratorContext(); 25 ~GeneratorContext();
26 std::vector<std::string> names; 26 std::vector<std::string> names;
27 std::vector<std::string> values; 27 std::vector<std::string> values;
28 }; 28 };
29 29
30 // Initializes a GeneratorContext with a random seed and name/value fixtures. 30 // Initializes a GeneratorContext with a random seed and name/value fixtures.
31 static void InitializeGeneratorContext(GeneratorContext* context); 31 static void InitializeGeneratorContext(GeneratorContext* context);
32 32
33 // Generates a header set from the generator context. 33 // Generates a header set from the generator context.
34 static std::map<std::string, std::string> NextGeneratedHeaderSet( 34 static SpdyHeaderBlock NextGeneratedHeaderSet(GeneratorContext* context);
35 GeneratorContext* context);
36 35
37 // Samples a size from the exponential distribution with mean |mean|, 36 // Samples a size from the exponential distribution with mean |mean|,
38 // upper-bounded by |sanity_bound|. 37 // upper-bounded by |sanity_bound|.
39 static size_t SampleExponential(size_t mean, size_t sanity_bound); 38 static size_t SampleExponential(size_t mean, size_t sanity_bound);
40 39
41 // Holds an input string, and manages an offset into that string. 40 // Holds an input string, and manages an offset into that string.
42 struct NET_EXPORT_PRIVATE Input { 41 struct NET_EXPORT_PRIVATE Input {
43 Input(); // Initializes |offset| to zero. 42 Input(); // Initializes |offset| to zero.
44 ~Input(); 43 ~Input();
45 44
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // |flip_per_thousand| bits for every 1,024 bytes of |buffer_length|, 83 // |flip_per_thousand| bits for every 1,024 bytes of |buffer_length|,
85 // rounding up. 84 // rounding up.
86 static void FlipBits(uint8* buffer, 85 static void FlipBits(uint8* buffer,
87 size_t buffer_length, 86 size_t buffer_length,
88 size_t flip_per_thousand); 87 size_t flip_per_thousand);
89 }; 88 };
90 89
91 } // namespace net 90 } // namespace net
92 91
93 #endif // NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_ 92 #endif // NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_
OLDNEW
« 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