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

Unified Diff: net/http2/hpack/decoder/hpack_entry_decoder_listener.cc

Issue 2293613002: Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Replace LOG(INFO) by VLOG(2) in DecodeBufferTest.SlowDecodeTestStruct so that trybots do not fail. 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
Index: net/http2/hpack/decoder/hpack_entry_decoder_listener.cc
diff --git a/net/http2/hpack/decoder/hpack_entry_decoder_listener.cc b/net/http2/hpack/decoder/hpack_entry_decoder_listener.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c7e991fb396bccd89160c5b730414da5712c03a5
--- /dev/null
+++ b/net/http2/hpack/decoder/hpack_entry_decoder_listener.cc
@@ -0,0 +1,83 @@
+// Copyright 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.
+
+#include "net/http2/hpack/decoder/hpack_entry_decoder_listener.h"
+
+#include "base/logging.h"
+
+namespace net {
+
+void HpackEntryDecoderVLoggingListener::OnIndexedHeader(size_t index) {
+ VLOG(1) << "OnIndexedHeader, index=" << index;
+ if (wrapped_) {
+ wrapped_->OnIndexedHeader(index);
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnStartLiteralHeader(
+ HpackEntryType entry_type,
+ size_t maybe_name_index) {
+ VLOG(1) << "OnStartLiteralHeader: entry_type=" << entry_type
+ << ", maybe_name_index=" << maybe_name_index;
+ if (wrapped_) {
+ wrapped_->OnStartLiteralHeader(entry_type, maybe_name_index);
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnNameStart(bool huffman_encoded,
+ size_t len) {
+ VLOG(1) << "OnNameStart: H=" << huffman_encoded << ", len=" << len;
+ if (wrapped_) {
+ wrapped_->OnNameStart(huffman_encoded, len);
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnNameData(const char* data,
+ size_t len) {
+ VLOG(1) << "OnNameData: len=" << len;
+ if (wrapped_) {
+ wrapped_->OnNameData(data, len);
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnNameEnd() {
+ VLOG(1) << "OnNameEnd";
+ if (wrapped_) {
+ wrapped_->OnNameEnd();
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnValueStart(bool huffman_encoded,
+ size_t len) {
+ VLOG(1) << "OnValueStart: H=" << huffman_encoded << ", len=" << len;
+ if (wrapped_) {
+ wrapped_->OnValueStart(huffman_encoded, len);
+ }
+ return;
+}
+
+void HpackEntryDecoderVLoggingListener::OnValueData(const char* data,
+ size_t len) {
+ VLOG(1) << "OnValueData: len=" << len;
+ if (wrapped_) {
+ wrapped_->OnValueData(data, len);
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnValueEnd() {
+ VLOG(1) << "OnValueEnd";
+ if (wrapped_) {
+ wrapped_->OnValueEnd();
+ }
+}
+
+void HpackEntryDecoderVLoggingListener::OnDynamicTableSizeUpdate(size_t size) {
+ VLOG(1) << "OnDynamicTableSizeUpdate: size=" << size;
+ if (wrapped_) {
+ wrapped_->OnDynamicTableSizeUpdate(size);
+ }
+ return;
+}
+
+} // namespace net
« no previous file with comments | « net/http2/hpack/decoder/hpack_entry_decoder_listener.h ('k') | net/http2/hpack/decoder/hpack_entry_decoder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698