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

Unified Diff: net/quic/quic_header_list.h

Issue 1870833005: relnote: Implements OnHeaderFrameStart and OnHeaderFrameEnd in QuicHeadersStream. Not used in produ… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@06_CL_119188441
Patch Set: Created 4 years, 8 months 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
Index: net/quic/quic_header_list.h
diff --git a/net/quic/quic_header_list.h b/net/quic/quic_header_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad914d255b167358daaab276290e91f34733b023
--- /dev/null
+++ b/net/quic/quic_header_list.h
@@ -0,0 +1,52 @@
+// Copyright (c) 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_QUIC_QUIC_HEADER_LIST_H_
ramant (doing other things) 2016/04/11 18:11:57 Please add a blank line between line#3 and line#4
Zhongyi Shi 2016/04/11 18:27:31 Done in the Final CL.
+#define NET_QUIC_QUIC_HEADER_LIST_H_
+
+#include <deque>
+#include <functional>
+
+#include "base/strings/string_piece.h"
+#include "net/base/net_export.h"
+#include "net/quic/quic_bug_tracker.h"
+#include "net/spdy/spdy_header_block.h"
+#include "net/spdy/spdy_headers_handler_interface.h"
+
+namespace net {
+
+// A simple class that accumulates header pairs
+class NET_EXPORT_PRIVATE QuicHeaderList : public SpdyHeadersHandlerInterface {
+ public:
+ typedef std::deque<std::pair<std::string, std::string>> ListType;
+
+ QuicHeaderList();
+ QuicHeaderList(QuicHeaderList&& other);
+ QuicHeaderList(const QuicHeaderList& other);
+ QuicHeaderList& operator=(QuicHeaderList&& other);
+ QuicHeaderList& operator=(const QuicHeaderList& other);
+ ~QuicHeaderList() override;
+
+ // From SpdyHeadersHandlerInteface.
+ void OnHeaderBlockStart() override;
+ void OnHeader(base::StringPiece name, base::StringPiece value) override;
+ void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override;
+
+ void Clear();
+
+ ListType::const_iterator begin() const { return header_list_.begin(); }
+ ListType::const_iterator end() const { return header_list_.end(); }
+
+ bool empty() const { return header_list_.empty(); }
+ size_t uncompressed_header_bytes() const {
+ return uncompressed_header_bytes_;
+ }
+
+ private:
+ std::deque<std::pair<std::string, std::string>> header_list_;
+ size_t uncompressed_header_bytes_;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_QUIC_HEADER_LIST_H_
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_header_list.cc » ('j') | net/quic/quic_header_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698