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

Side by Side Diff: net/spdy/hpack/hpack_entry.h

Issue 1989003002: QUIC - add instrumentation to HPACK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update Created 4 years, 7 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
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_header_table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SPDY_HPACK_ENTRY_H_ 5 #ifndef NET_SPDY_HPACK_ENTRY_H_
6 #define NET_SPDY_HPACK_ENTRY_H_ 6 #define NET_SPDY_HPACK_ENTRY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Used to compute the entry's index in the header table. 67 // Used to compute the entry's index in the header table.
68 size_t InsertionIndex() const { return insertion_index_; } 68 size_t InsertionIndex() const { return insertion_index_; }
69 69
70 // Returns the size of an entry as defined in 5.1. 70 // Returns the size of an entry as defined in 5.1.
71 static size_t Size(base::StringPiece name, base::StringPiece value); 71 static size_t Size(base::StringPiece name, base::StringPiece value);
72 size_t Size() const; 72 size_t Size() const;
73 73
74 std::string GetDebugString() const; 74 std::string GetDebugString() const;
75 75
76 int64_t time_added() const { return time_added_; }
77 void set_time_added(int64_t now) { time_added_ = now; }
78
76 private: 79 private:
77 enum EntryType { 80 enum EntryType {
78 LOOKUP, 81 LOOKUP,
79 DYNAMIC, 82 DYNAMIC,
80 STATIC, 83 STATIC,
81 }; 84 };
82 85
83 // These members are not used for LOOKUP entries. 86 // These members are not used for LOOKUP entries.
84 std::string name_; 87 std::string name_;
85 std::string value_; 88 std::string value_;
86 89
87 // These members are always valid. For DYNAMIC and STATIC entries, they 90 // These members are always valid. For DYNAMIC and STATIC entries, they
88 // always point to |name_| and |value_|. 91 // always point to |name_| and |value_|.
89 base::StringPiece name_ref_; 92 base::StringPiece name_ref_;
90 base::StringPiece value_ref_; 93 base::StringPiece value_ref_;
91 94
92 // The entry's index in the total set of entries ever inserted into the header 95 // The entry's index in the total set of entries ever inserted into the header
93 // table. 96 // table.
94 size_t insertion_index_; 97 size_t insertion_index_;
95 98
96 EntryType type_; 99 EntryType type_;
100
101 // For HpackHeaderTable::DebugVisitorInterface
102 int64_t time_added_;
97 }; 103 };
98 104
99 } // namespace net 105 } // namespace net
100 106
101 #endif // NET_SPDY_HPACK_ENTRY_H_ 107 #endif // NET_SPDY_HPACK_ENTRY_H_
OLDNEW
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_header_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698