blob: 5f5a98d6b5ec4c90094d4610c467344f985d6e21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HEADER_BLOCK_H_
#define NET_SPDY_SPDY_HEADER_BLOCK_H_
#include <map>
#include <string>
#include "net/base/net_export.h"
#include "net/log/net_log.h"
namespace net {
// A data structure for holding a set of headers from either a
// SYN_STREAM or SYN_REPLY frame.
typedef std::map<std::string, std::string> SpdyHeaderBlock;
// Converts a SpdyHeaderBlock into NetLog event parameters.
NET_EXPORT scoped_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
const SpdyHeaderBlock* headers,
NetLogCaptureMode capture_mode);
// Converts NetLog event parameters into a SPDY header block and writes them
// to |headers|. |event_param| must have been created by
// SpdyHeaderBlockNetLogCallback. On failure, returns false and clears
// |headers|.
NET_EXPORT bool SpdyHeaderBlockFromNetLogParam(
const base::Value* event_param,
SpdyHeaderBlock* headers);
} // namespace net
#endif // NET_SPDY_SPDY_HEADER_BLOCK_H_
|