OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SPDY_DEFRAMER_VISITOR_H_ | 5 #ifndef NET_SPDY_SPDY_DEFRAMER_VISITOR_H_ |
6 #define NET_SPDY_SPDY_DEFRAMER_VISITOR_H_ | 6 #define NET_SPDY_SPDY_DEFRAMER_VISITOR_H_ |
7 | 7 |
8 // Supports testing by converting callbacks to SpdyFramerVisitorInterface into | 8 // Supports testing by converting callbacks to SpdyFramerVisitorInterface into |
9 // callbacks to SpdyDeframerVisitorInterface, whose arguments are generally | 9 // callbacks to SpdyDeframerVisitorInterface, whose arguments are generally |
10 // SpdyFrameIR instances. This enables a test client or test backend to operate | 10 // SpdyFrameIR instances. This enables a test client or test backend to operate |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 #include <stdint.h> | 70 #include <stdint.h> |
71 | 71 |
72 #include <memory> | 72 #include <memory> |
73 #include <type_traits> | 73 #include <type_traits> |
74 #include <utility> | 74 #include <utility> |
75 #include <vector> | 75 #include <vector> |
76 | 76 |
77 #include "base/logging.h" | 77 #include "base/logging.h" |
78 #include "base/macros.h" | 78 #include "base/macros.h" |
| 79 #include "net/spdy/core/spdy_framer.h" |
| 80 #include "net/spdy/core/spdy_protocol.h" |
| 81 #include "net/spdy/core/spdy_protocol_test_utils.h" |
| 82 #include "net/spdy/core/spdy_test_utils.h" |
79 #include "net/spdy/platform/api/spdy_string.h" | 83 #include "net/spdy/platform/api/spdy_string.h" |
80 #include "net/spdy/spdy_framer.h" | |
81 #include "net/spdy/spdy_protocol.h" | |
82 #include "net/spdy/spdy_protocol_test_utils.h" | |
83 #include "net/spdy/spdy_test_utils.h" | |
84 | 84 |
85 namespace net { | 85 namespace net { |
86 namespace test { | 86 namespace test { |
87 | 87 |
88 // Non-lossy representation of a SETTINGS frame payload. | 88 // Non-lossy representation of a SETTINGS frame payload. |
89 typedef std::vector<std::pair<SpdySettingsIds, uint32_t>> SettingVector; | 89 typedef std::vector<std::pair<SpdySettingsIds, uint32_t>> SettingVector; |
90 | 90 |
91 // StringPairVector is used to record information lost by SpdyHeaderBlock, in | 91 // StringPairVector is used to record information lost by SpdyHeaderBlock, in |
92 // particular the order of each header entry, though it doesn't expose the | 92 // particular the order of each header entry, though it doesn't expose the |
93 // inner details of the HPACK block, such as the type of encoding selected | 93 // inner details of the HPACK block, such as the type of encoding selected |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void OnError(SpdyFramer* framer, SpdyTestDeframer* deframer) override; | 241 void OnError(SpdyFramer* framer, SpdyTestDeframer* deframer) override; |
242 | 242 |
243 private: | 243 private: |
244 std::vector<CollectedFrame>* collected_frames_; | 244 std::vector<CollectedFrame>* collected_frames_; |
245 }; | 245 }; |
246 | 246 |
247 } // namespace test | 247 } // namespace test |
248 } // namespace net | 248 } // namespace net |
249 | 249 |
250 #endif // NET_SPDY_SPDY_DEFRAMER_VISITOR_H_ | 250 #endif // NET_SPDY_SPDY_DEFRAMER_VISITOR_H_ |
OLD | NEW |