| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_SPDY_UTILS_H_ | 5 #ifndef NET_TOOLS_QUIC_SPDY_UTILS_H_ |
| 6 #define NET_TOOLS_QUIC_SPDY_UTILS_H_ | 6 #define NET_TOOLS_QUIC_SPDY_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/spdy/spdy_framer.h" |
| 10 #include "net/spdy/spdy_header_block.h" | 11 #include "net/spdy/spdy_header_block.h" |
| 11 #include "net/spdy/spdy_protocol.h" | 12 #include "net/spdy/spdy_protocol.h" |
| 12 #include "net/tools/flip_server/balsa_headers.h" | 13 #include "net/tools/flip_server/balsa_headers.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 namespace tools { | 16 namespace tools { |
| 16 | 17 |
| 17 class SpdyUtils { | 18 class SpdyUtils { |
| 18 public: | 19 public: |
| 19 static std::string SerializeRequestHeaders( | 20 static std::string SerializeRequestHeaders( |
| 20 const BalsaHeaders& request_headers); | 21 const BalsaHeaders& request_headers); |
| 21 | 22 |
| 22 static std::string SerializeResponseHeaders( | 23 static std::string SerializeResponseHeaders( |
| 23 const BalsaHeaders& response_headers); | 24 const BalsaHeaders& response_headers); |
| 24 | 25 |
| 25 static bool FillBalsaRequestHeaders(const SpdyHeaderBlock& header_block, | 26 static bool FillBalsaRequestHeaders(const SpdyHeaderBlock& header_block, |
| 26 BalsaHeaders* request_headers); | 27 BalsaHeaders* request_headers); |
| 27 | 28 |
| 28 static bool FillBalsaResponseHeaders(const SpdyHeaderBlock& header_block, | 29 static bool FillBalsaResponseHeaders(const SpdyHeaderBlock& header_block, |
| 29 BalsaHeaders* response_headers); | 30 BalsaHeaders* response_headers); |
| 31 |
| 32 static SpdyHeaderBlock RequestHeadersToSpdyHeaders( |
| 33 const BalsaHeaders& request_headers); |
| 34 |
| 35 static SpdyHeaderBlock ResponseHeadersToSpdyHeaders( |
| 36 const BalsaHeaders& response_headers); |
| 37 |
| 38 static std::string SerializeUncompressedHeaders( |
| 39 const SpdyHeaderBlock& headers); |
| 30 }; | 40 }; |
| 31 | 41 |
| 32 } // namespace tools | 42 } // namespace tools |
| 33 } // namespace net | 43 } // namespace net |
| 34 | 44 |
| 35 #endif // NET_TOOLS_QUIC_SPDY_UTILS_H_ | 45 #endif // NET_TOOLS_QUIC_SPDY_UTILS_H_ |
| OLD | NEW |