forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathquic_http_utils.h
49 lines (39 loc) · 1.84 KB
/
quic_http_utils.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2013 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_QUIC_QUIC_HTTP_UTILS_H_
#define NET_QUIC_QUIC_HTTP_UTILS_H_
#include "base/values.h"
#include "net/base/net_export.h"
#include "net/base/request_priority.h"
#include "net/log/net_log_capture_mode.h"
#include "net/third_party/quiche/src/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
#include "net/third_party/quiche/src/spdy/core/spdy_protocol.h"
namespace net {
// TODO(crbug/988608): Convert to SpdyStreamPrecedence directly instead of to
// SpdyPriority which will go away eventually.
NET_EXPORT_PRIVATE spdy::SpdyPriority ConvertRequestPriorityToQuicPriority(
RequestPriority priority);
NET_EXPORT_PRIVATE RequestPriority
ConvertQuicPriorityToRequestPriority(spdy::SpdyPriority priority);
// Converts a spdy::Http2HeaderBlock, stream_id and priority into NetLog event
// parameters.
NET_EXPORT base::Value QuicRequestNetLogParams(
quic::QuicStreamId stream_id,
const spdy::Http2HeaderBlock* headers,
spdy::SpdyPriority priority,
NetLogCaptureMode capture_mode);
// Converts a spdy::Http2HeaderBlock and stream into NetLog event parameters.
NET_EXPORT base::Value QuicResponseNetLogParams(
quic::QuicStreamId stream_id,
bool fin_received,
const spdy::Http2HeaderBlock* headers,
NetLogCaptureMode capture_mode);
// Parses |alt_svc_versions| into a quic::ParsedQuicVersionVector and removes
// all entries that aren't found in |supported_versions|.
NET_EXPORT quic::ParsedQuicVersionVector FilterSupportedAltSvcVersions(
const spdy::SpdyAltSvcWireFormat::AlternativeService& quic_alt_svc,
const quic::ParsedQuicVersionVector& supported_versions);
} // namespace net
#endif // NET_QUIC_QUIC_HTTP_UTILS_H_