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/file_util.h" | |
8 #include "base/files/file.h" | 7 #include "base/files/file.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/fuzzing/hpack_fuzz_util.h" |
11 #include "net/spdy/hpack_constants.h" | 11 #include "net/spdy/hpack_constants.h" |
12 #include "net/spdy/hpack_encoder.h" | 12 #include "net/spdy/hpack_encoder.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Target file for generated HPACK header sets. | 16 // Target file for generated HPACK header sets. |
17 const char kFileToWrite[] = "file-to-write"; | 17 const char kFileToWrite[] = "file-to-write"; |
18 | 18 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 string prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size()); | 67 string prefix = HpackFuzzUtil::HeaderBlockPrefix(buffer.size()); |
68 | 68 |
69 CHECK_LT(0, file_out.WriteAtCurrentPos(prefix.data(), prefix.size())); | 69 CHECK_LT(0, file_out.WriteAtCurrentPos(prefix.data(), prefix.size())); |
70 CHECK_LT(0, file_out.WriteAtCurrentPos(buffer.data(), buffer.size())); | 70 CHECK_LT(0, file_out.WriteAtCurrentPos(buffer.data(), buffer.size())); |
71 } | 71 } |
72 CHECK(file_out.Flush()); | 72 CHECK(file_out.Flush()); |
73 DVLOG(1) << "Generated " << example_count << " blocks."; | 73 DVLOG(1) << "Generated " << example_count << " blocks."; |
74 return 0; | 74 return 0; |
75 } | 75 } |
OLD | NEW |