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

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

Issue 2606733004: Add HpackDecoderTables, static and dynamic tables for decoding HPACK. (Closed)
Patch Set: Move random_util.* to test build target. 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/hpack_static_table_entries.inc ('k') | net/http2/hpack/hpack_string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/hpack/hpack_string.h
diff --git a/net/http2/hpack/hpack_string.h b/net/http2/hpack/hpack_string.h
index aeb0c96ca24c95aa2d3fdcc6f58575ad67671ad4..5a7b693e4a466ab8831f34afe654778f28da773c 100644
--- a/net/http2/hpack/hpack_string.h
+++ b/net/http2/hpack/hpack_string.h
@@ -30,6 +30,8 @@ class NET_EXPORT_PRIVATE HpackString {
// Not sure yet whether this move ctor is required/sensible.
HpackString(HpackString&& other) = default;
+ HpackString& operator=(const HpackString& other) = default;
Bence 2016/12/28 14:56:41 I need to explicitly define a copy assignment oper
+
~HpackString();
size_t size() const { return str_.size(); }
@@ -51,6 +53,24 @@ NET_EXPORT_PRIVATE bool operator!=(const HpackString& a, base::StringPiece b);
NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
const HpackString& v);
+struct NET_EXPORT_PRIVATE HpackStringPair {
+ HpackStringPair(const HpackString& name, const HpackString& value);
+ HpackStringPair(base::StringPiece name, base::StringPiece value);
+ ~HpackStringPair();
+
+ // Returns the size of a header entry with this name and value, per the RFC:
+ // http://httpwg.org/specs/rfc7541.html#calculating.table.size
+ size_t size() const { return 32 + name.size() + value.size(); }
+
+ std::string DebugString() const;
+
+ HpackString name;
Bence 2016/12/28 14:56:41 These member cannot be const: it is not possible f
+ HpackString value;
+};
+
+NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
+ const HpackStringPair& p);
+
} // namespace net
#endif // NET_HTTP2_HPACK_HPACK_STRING_H_
« no previous file with comments | « net/http2/hpack/hpack_static_table_entries.inc ('k') | net/http2/hpack/hpack_string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698