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

Unified Diff: net/spdy/hpack_encoder.h

Issue 243153003: HPACK optimal Huffman code instrumentation and UMA collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/spdy/hpack_encoder.h
diff --git a/net/spdy/hpack_encoder.h b/net/spdy/hpack_encoder.h
index 12fa8b458740ba10bf5a287b02a47d39e64decf8..6458cad5e4b8efb1fb924fc5ff3186dd091338fd 100644
--- a/net/spdy/hpack_encoder.h
+++ b/net/spdy/hpack_encoder.h
@@ -35,13 +35,24 @@ class NET_EXPORT_PRIVATE HpackEncoder {
bool EncodeHeaderSet(const std::map<std::string, std::string>& header_set,
std::string* output);
+ // Sets externally-owned storage for aggregating character counts of emitted
+ // literal representations.
+ void SetCharCountsStorage(std::vector<size_t>* char_counts,
+ size_t* total_char_counts);
+
private:
static void CookieToCrumbs(base::StringPiece cookie,
std::vector<base::StringPiece>* out);
+ void UpdateCharacterCounts(base::StringPiece str);
+
uint32 max_string_literal_size_;
HpackEncodingContext context_;
+ // Externally-owned, nullable storage for character counts of literals.
+ std::vector<size_t>* char_counts_;
+ size_t* total_char_counts_;
+
DISALLOW_COPY_AND_ASSIGN(HpackEncoder);
};
« no previous file with comments | « net/net.gypi ('k') | net/spdy/hpack_encoder.cc » ('j') | net/spdy/hpack_huffman_aggregator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698