OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
6 #define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 6 #define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 class BalsaBuffer { | 57 class BalsaBuffer { |
58 public: | 58 public: |
59 static const size_t kDefaultBlocksize = 4096; | 59 static const size_t kDefaultBlocksize = 4096; |
60 // We have two friends here. These exist as friends as we | 60 // We have two friends here. These exist as friends as we |
61 // want to allow access to the constructors for the test | 61 // want to allow access to the constructors for the test |
62 // class and the Balsa* classes. We put this into the | 62 // class and the Balsa* classes. We put this into the |
63 // header file as we want this class to be inlined into the | 63 // header file as we want this class to be inlined into the |
64 // BalsaHeaders implementation, yet be testable. | 64 // BalsaHeaders implementation, yet be testable. |
65 friend class BalsaBufferTestSpouse; | 65 friend class BalsaBufferTestSpouse; |
66 friend class BalsaHeaders; | 66 friend class BalsaHeaders; |
| 67 friend class BalsaBufferTest; |
67 | 68 |
68 // The BufferBlock is a structure used internally by the | 69 // The BufferBlock is a structure used internally by the |
69 // BalsaBuffer class to store the base buffer pointers to | 70 // BalsaBuffer class to store the base buffer pointers to |
70 // each block, as well as the important metadata for buffer | 71 // each block, as well as the important metadata for buffer |
71 // sizes and bytes free. | 72 // sizes and bytes free. |
72 struct BufferBlock { | 73 struct BufferBlock { |
73 public: | 74 public: |
74 char* buffer; | 75 char* buffer; |
75 size_t buffer_size; | 76 size_t buffer_size; |
76 size_t bytes_free; | 77 size_t bytes_free; |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 size_t end_of_firstline_idx_; | 1129 size_t end_of_firstline_idx_; |
1129 | 1130 |
1130 bool transfer_encoding_is_chunked_; | 1131 bool transfer_encoding_is_chunked_; |
1131 | 1132 |
1132 HeaderLines header_lines_; | 1133 HeaderLines header_lines_; |
1133 }; | 1134 }; |
1134 | 1135 |
1135 } // namespace net | 1136 } // namespace net |
1136 | 1137 |
1137 #endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 1138 #endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
OLD | NEW |