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 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "net/spdy/fuzzing/hpack_fuzz_util.h" | 10 #include "net/spdy/core/fuzzing/hpack_fuzz_util.h" |
11 #include "net/spdy/hpack/hpack_constants.h" | 11 #include "net/spdy/core/hpack/hpack_constants.h" |
12 #include "net/spdy/hpack/hpack_encoder.h" | 12 #include "net/spdy/core/hpack/hpack_encoder.h" |
| 13 #include "net/spdy/core/spdy_protocol.h" |
13 #include "net/spdy/platform/api/spdy_string.h" | 14 #include "net/spdy/platform/api/spdy_string.h" |
14 #include "net/spdy/spdy_protocol.h" | |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Target file for generated HPACK header sets. | 18 // Target file for generated HPACK header sets. |
19 const char kFileToWrite[] = "file-to-write"; | 19 const char kFileToWrite[] = "file-to-write"; |
20 | 20 |
21 // Number of header sets to generate. | 21 // Number of header sets to generate. |
22 const char kExampleCount[] = "example-count"; | 22 const char kExampleCount[] = "example-count"; |
23 | 23 |
24 } // namespace | 24 } // namespace |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 SpdyString prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size()); | 69 SpdyString prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size()); |
70 | 70 |
71 CHECK_LT(0, file_out.WriteAtCurrentPos(prefix.data(), prefix.size())); | 71 CHECK_LT(0, file_out.WriteAtCurrentPos(prefix.data(), prefix.size())); |
72 CHECK_LT(0, file_out.WriteAtCurrentPos(buffer.data(), buffer.size())); | 72 CHECK_LT(0, file_out.WriteAtCurrentPos(buffer.data(), buffer.size())); |
73 } | 73 } |
74 CHECK(file_out.Flush()); | 74 CHECK(file_out.Flush()); |
75 DVLOG(1) << "Generated " << example_count << " blocks."; | 75 DVLOG(1) << "Generated " << example_count << " blocks."; |
76 return 0; | 76 return 0; |
77 } | 77 } |
OLD | NEW |