We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / net / tools / quic / spdy_utils.h
blob6beff98ef063d713b88c0dff0db0ca989874a35e
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
3 // found in the LICENSE file.
5 #ifndef NET_TOOLS_QUIC_SPDY_UTILS_H_
6 #define NET_TOOLS_QUIC_SPDY_UTILS_H_
8 #include <string>
10 #include "net/spdy/spdy_framer.h"
11 #include "net/spdy/spdy_header_block.h"
12 #include "net/spdy/spdy_protocol.h"
13 #include "net/tools/balsa/balsa_headers.h"
15 namespace net {
16 namespace tools {
18 class SpdyUtils {
19 public:
20 static std::string SerializeRequestHeaders(
21 const BalsaHeaders& request_headers);
23 static std::string SerializeResponseHeaders(
24 const BalsaHeaders& response_headers);
26 static bool FillBalsaRequestHeaders(const SpdyHeaderBlock& header_block,
27 BalsaHeaders* request_headers);
29 static bool FillBalsaResponseHeaders(const SpdyHeaderBlock& header_block,
30 BalsaHeaders* response_headers);
32 static SpdyHeaderBlock RequestHeadersToSpdyHeaders(
33 const BalsaHeaders& request_headers);
35 static SpdyHeaderBlock RequestHeadersToSpdy4Headers(
36 const BalsaHeaders& request_headers);
38 static SpdyHeaderBlock ResponseHeadersToSpdyHeaders(
39 const BalsaHeaders& response_headers);
41 static std::string SerializeUncompressedHeaders(
42 const SpdyHeaderBlock& headers);
44 static void SpdyHeadersToResponseHeaders(const SpdyHeaderBlock& block,
45 BalsaHeaders* headers);
47 private:
48 DISALLOW_COPY_AND_ASSIGN(SpdyUtils);
51 } // namespace tools
52 } // namespace net
54 #endif // NET_TOOLS_QUIC_SPDY_UTILS_H_