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

Unified Diff: net/spdy/spdy_framer.cc

Issue 2553683006: Add HpackDecoder2. (Closed)
Patch Set: 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/spdy/spdy_framer.h ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.cc
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 6bbadf470579f631ae759f965fb4a08d05da9a5a..0ec0236aa0cd9f6d5487cd80e6186739cc04edb0 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -23,6 +23,8 @@
#include "base/strings/string_util.h"
#include "net/quic/core/quic_flags.h"
#include "net/spdy/hpack/hpack_constants.h"
+#include "net/spdy/hpack/hpack_decoder.h"
+#include "net/spdy/hpack/hpack_decoder2.h"
#include "net/spdy/spdy_bitmasks.h"
#include "net/spdy/spdy_bug_tracker.h"
#include "net/spdy/spdy_flags.h"
@@ -2359,7 +2361,11 @@ HpackEncoder* SpdyFramer::GetHpackEncoder() {
HpackDecoderInterface* SpdyFramer::GetHpackDecoder() {
if (hpack_decoder_.get() == nullptr) {
- hpack_decoder_.reset(new HpackDecoder());
+ if (FLAGS_chromium_http2_flag_spdy_use_hpack_decoder2) {
+ hpack_decoder_.reset(new HpackDecoder2());
+ } else {
+ hpack_decoder_.reset(new HpackDecoder());
+ }
}
return hpack_decoder_.get();
}
« no previous file with comments | « net/spdy/spdy_framer.h ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698