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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #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.
5 #define NET_QUIC_QUIC_HEADER_LIST_H_
6
7 #include <deque>
8 #include <functional>
9
10 #include "base/strings/string_piece.h"
11 #include "net/base/net_export.h"
12 #include "net/quic/quic_bug_tracker.h"
13 #include "net/spdy/spdy_header_block.h"
14 #include "net/spdy/spdy_headers_handler_interface.h"
15
16 namespace net {
17
18 // A simple class that accumulates header pairs
19 class NET_EXPORT_PRIVATE QuicHeaderList : public SpdyHeadersHandlerInterface {
20 public:
21 typedef std::deque<std::pair<std::string, std::string>> ListType;
22
23 QuicHeaderList();
24 QuicHeaderList(QuicHeaderList&& other);
25 QuicHeaderList(const QuicHeaderList& other);
26 QuicHeaderList& operator=(QuicHeaderList&& other);
27 QuicHeaderList& operator=(const QuicHeaderList& other);
28 ~QuicHeaderList() override;
29
30 // From SpdyHeadersHandlerInteface.
31 void OnHeaderBlockStart() override;
32 void OnHeader(base::StringPiece name, base::StringPiece value) override;
33 void OnHeaderBlockEnd(size_t uncompressed_header_bytes) override;
34
35 void Clear();
36
37 ListType::const_iterator begin() const { return header_list_.begin(); }
38 ListType::const_iterator end() const { return header_list_.end(); }
39
40 bool empty() const { return header_list_.empty(); }
41 size_t uncompressed_header_bytes() const {
42 return uncompressed_header_bytes_;
43 }
44
45 private:
46 std::deque<std::pair<std::string, std::string>> header_list_;
47 size_t uncompressed_header_bytes_;
48 };
49
50 } // namespace net
51
52 #endif // NET_QUIC_QUIC_HEADER_LIST_H_
OLDNEW
« 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