Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / spdy / spdy_header_block.h
blob5f5a98d6b5ec4c90094d4610c467344f985d6e21
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_SPDY_SPDY_HEADER_BLOCK_H_
6 #define NET_SPDY_SPDY_HEADER_BLOCK_H_
8 #include <map>
9 #include <string>
11 #include "net/base/net_export.h"
12 #include "net/log/net_log.h"
14 namespace net {
16 // A data structure for holding a set of headers from either a
17 // SYN_STREAM or SYN_REPLY frame.
18 typedef std::map<std::string, std::string> SpdyHeaderBlock;
20 // Converts a SpdyHeaderBlock into NetLog event parameters.
21 NET_EXPORT scoped_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
22 const SpdyHeaderBlock* headers,
23 NetLogCaptureMode capture_mode);
25 // Converts NetLog event parameters into a SPDY header block and writes them
26 // to |headers|. |event_param| must have been created by
27 // SpdyHeaderBlockNetLogCallback. On failure, returns false and clears
28 // |headers|.
29 NET_EXPORT bool SpdyHeaderBlockFromNetLogParam(
30 const base::Value* event_param,
31 SpdyHeaderBlock* headers);
33 } // namespace net
35 #endif // NET_SPDY_SPDY_HEADER_BLOCK_H_