| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/spdy/hpack/hpack_decoder.h" | 15 #include "net/spdy/core/hpack/hpack_decoder.h" |
| 16 #include "net/spdy/hpack/hpack_encoder.h" | 16 #include "net/spdy/core/hpack/hpack_encoder.h" |
| 17 #include "net/spdy/platform/api/spdy_string.h" | 17 #include "net/spdy/platform/api/spdy_string.h" |
| 18 #include "net/spdy/platform/api/spdy_string_piece.h" | 18 #include "net/spdy/platform/api/spdy_string_piece.h" |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 | 21 |
| 22 class NET_EXPORT_PRIVATE HpackFuzzUtil { | 22 class NET_EXPORT_PRIVATE HpackFuzzUtil { |
| 23 public: | 23 public: |
| 24 // A GeneratorContext holds ordered header names & values which are | 24 // A GeneratorContext holds ordered header names & values which are |
| 25 // initially seeded and then expanded with dynamically generated data. | 25 // initially seeded and then expanded with dynamically generated data. |
| 26 struct NET_EXPORT_PRIVATE GeneratorContext { | 26 struct NET_EXPORT_PRIVATE GeneratorContext { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // |flip_per_thousand| bits for every 1,024 bytes of |buffer_length|, | 86 // |flip_per_thousand| bits for every 1,024 bytes of |buffer_length|, |
| 87 // rounding up. | 87 // rounding up. |
| 88 static void FlipBits(uint8_t* buffer, | 88 static void FlipBits(uint8_t* buffer, |
| 89 size_t buffer_length, | 89 size_t buffer_length, |
| 90 size_t flip_per_thousand); | 90 size_t flip_per_thousand); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace net | 93 } // namespace net |
| 94 | 94 |
| 95 #endif // NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_ | 95 #endif // NET_SPDY_FUZZING_HPACK_FUZZ_UTIL_H_ |
| OLD | NEW |