Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: net/http2/hpack/http2_hpack_constants.h

Issue 2293613002: Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Replace LOG(INFO) by VLOG(2) in DecodeBufferTest.SlowDecodeTestStruct so that trybots do not fail. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http2/hpack/decoder/hpack_varint_decoder_test.cc ('k') | net/http2/hpack/http2_hpack_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/hpack/http2_hpack_constants.h
diff --git a/net/http2/hpack/http2_hpack_constants.h b/net/http2/hpack/http2_hpack_constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..b9883a01cf7215c852f01c039324020fdac1eae9
--- /dev/null
+++ b/net/http2/hpack/http2_hpack_constants.h
@@ -0,0 +1,61 @@
+// Copyright 2016 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_HTTP2_HPACK_HTTP2_HPACK_CONSTANTS_H_
+#define NET_HTTP2_HPACK_HTTP2_HPACK_CONSTANTS_H_
+
+// Enum HpackEntryType identifies the 5 basic types of HPACK Block Entries.
+//
+// See the spec for details:
+// https://http2.github.io/http2-spec/compression.html#rfc.section.6
+
+#include <ostream>
+#include <string>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+enum class HpackEntryType {
+ // Entry is an index into the static or dynamic table. Decoding it has no
+ // effect on the dynamic table.
+ kIndexedHeader,
+
+ // The entry contains a literal value. The name may be either a literal or a
+ // reference to an entry in the static or dynamic table.
+ // The entry is added to the dynamic table after decoding.
+ kIndexedLiteralHeader,
+
+ // The entry contains a literal value. The name may be either a literal or a
+ // reference to an entry in the static or dynamic table.
+ // The entry is not added to the dynamic table after decoding, but a proxy
+ // may choose to insert the entry into its dynamic table when forwarding
+ // to another endpoint.
+ kUnindexedLiteralHeader,
+
+ // The entry contains a literal value. The name may be either a literal or a
+ // reference to an entry in the static or dynamic table.
+ // The entry is not added to the dynamic table after decoding, and a proxy
+ // must NOT insert the entry into its dynamic table when forwarding to another
+ // endpoint.
+ kNeverIndexedLiteralHeader,
+
+ // Entry conveys the size limit of the dynamic table of the encoder to
+ // the decoder. May be used to flush the table by sending a zero and then
+ // resetting the size back up to the maximum that the encoder will use
+ // (within the limits of SETTINGS_HEADER_TABLE_SIZE sent by the
+ // decoder to the encoder, with the default of 4096 assumed).
+ kDynamicTableSizeUpdate,
+};
+
+// Returns the name of the enum member.
+NET_EXPORT_PRIVATE std::string HpackEntryTypeToString(HpackEntryType v);
+
+// Inserts the name of the enum member into |out|.
+NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
+ HpackEntryType v);
+
+} // namespace net
+
+#endif // NET_HTTP2_HPACK_HTTP2_HPACK_CONSTANTS_H_
« no previous file with comments | « net/http2/hpack/decoder/hpack_varint_decoder_test.cc ('k') | net/http2/hpack/http2_hpack_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698