summaryrefslogtreecommitdiff
path: root/chromium/net/third_party/quiche/src/http2/hpack
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/third_party/quiche/src/http2/hpack')
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_collector.cc4
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.cc10
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.h4
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.cc26
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.cc49
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state_test.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer.cc31
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc34
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.cc29
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables_test.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_test.cc4
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.cc20
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.cc22
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder_test.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h14
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.cc8
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_test.cc10
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.cc44
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/hpack_string.cc8
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/hpack_string_test.cc6
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/http2_hpack_constants_test.cc47
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.cc14
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder_test.cc1
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder_test.cc1
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/tools/hpack_example.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.cc5
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder_test.cc23
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.cc2
-rw-r--r--chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_round_trip_test.cc39
35 files changed, 242 insertions, 233 deletions
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_collector.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_collector.cc
index 5b2c6b7293a..1137be53d85 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_collector.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_collector.cc
@@ -7,7 +7,7 @@
#include <algorithm>
#include <memory>
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
using ::testing::AssertionResult;
@@ -55,7 +55,7 @@ void HpackBlockCollector::OnValueEnd() {
void HpackBlockCollector::PushPendingEntry() {
EXPECT_TRUE(pending_entry_.IsComplete());
- DVLOG(2) << "PushPendingEntry: " << pending_entry_;
+ HTTP2_DVLOG(2) << "PushPendingEntry: " << pending_entry_;
entries_.push_back(pending_entry_);
EXPECT_TRUE(entries_.back().IsComplete());
pending_entry_.Clear();
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.cc
index c6882d292c4..656f8e9866e 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.cc
@@ -6,15 +6,15 @@
#include <cstdint>
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
namespace http2 {
DecodeStatus HpackBlockDecoder::Decode(DecodeBuffer* db) {
if (!before_entry_) {
- DVLOG(2) << "HpackBlockDecoder::Decode resume entry, db->Remaining="
- << db->Remaining();
+ HTTP2_DVLOG(2) << "HpackBlockDecoder::Decode resume entry, db->Remaining="
+ << db->Remaining();
DecodeStatus status = entry_decoder_.Resume(db, listener_);
switch (status) {
case DecodeStatus::kDecodeDone:
@@ -29,8 +29,8 @@ DecodeStatus HpackBlockDecoder::Decode(DecodeBuffer* db) {
}
DCHECK(before_entry_);
while (db->HasData()) {
- DVLOG(2) << "HpackBlockDecoder::Decode start entry, db->Remaining="
- << db->Remaining();
+ HTTP2_DVLOG(2) << "HpackBlockDecoder::Decode start entry, db->Remaining="
+ << db->Remaining();
DecodeStatus status = entry_decoder_.Start(db, listener_);
switch (status) {
case DecodeStatus::kDecodeDone:
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.h b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.h
index e8b23e16dce..a17664f8ded 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.h
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_block_decoder.h
@@ -10,12 +10,12 @@
// or dynamic table support, so table indices remain indices at this level.
// Reports the entries to an HpackEntryDecoderListener.
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h"
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
namespace http2 {
@@ -35,7 +35,7 @@ class HTTP2_EXPORT_PRIVATE HpackBlockDecoder {
// to be called from an implementation of Http2FrameDecoderListener's
// OnHeadersStart or OnPushPromiseStart methods.
void Reset() {
- DVLOG(2) << "HpackBlockDecoder::Reset";
+ HTTP2_DVLOG(2) << "HpackBlockDecoder::Reset";
before_entry_ = true;
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.cc
index d6897cbbfa1..f2f8584e97a 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.cc
@@ -4,9 +4,9 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_estimate_memory_usage.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
@@ -33,8 +33,8 @@ void HpackDecoder::ApplyHeaderTableSizeSetting(uint32_t max_header_table_size) {
}
bool HpackDecoder::StartDecodingBlock() {
- DVLOG(3) << "HpackDecoder::StartDecodingBlock, error_detected="
- << (error_detected() ? "true" : "false");
+ HTTP2_DVLOG(3) << "HpackDecoder::StartDecodingBlock, error_detected="
+ << (error_detected() ? "true" : "false");
if (error_detected()) {
return false;
}
@@ -47,9 +47,9 @@ bool HpackDecoder::StartDecodingBlock() {
}
bool HpackDecoder::DecodeFragment(DecodeBuffer* db) {
- DVLOG(3) << "HpackDecoder::DecodeFragment, error_detected="
- << (error_detected() ? "true" : "false")
- << ", size=" << db->Remaining();
+ HTTP2_DVLOG(3) << "HpackDecoder::DecodeFragment, error_detected="
+ << (error_detected() ? "true" : "false")
+ << ", size=" << db->Remaining();
if (error_detected()) {
return false;
}
@@ -74,8 +74,8 @@ bool HpackDecoder::DecodeFragment(DecodeBuffer* db) {
}
bool HpackDecoder::EndDecodingBlock() {
- DVLOG(3) << "HpackDecoder::EndDecodingBlock, error_detected="
- << (error_detected() ? "true" : "false");
+ HTTP2_DVLOG(3) << "HpackDecoder::EndDecodingBlock, error_detected="
+ << (error_detected() ? "true" : "false");
if (error_detected()) {
return false;
}
@@ -95,10 +95,10 @@ bool HpackDecoder::EndDecodingBlock() {
bool HpackDecoder::error_detected() {
if (!error_detected_) {
if (entry_buffer_.error_detected()) {
- DVLOG(2) << "HpackDecoder::error_detected in entry_buffer_";
+ HTTP2_DVLOG(2) << "HpackDecoder::error_detected in entry_buffer_";
error_detected_ = true;
} else if (decoder_state_.error_detected()) {
- DVLOG(2) << "HpackDecoder::error_detected in decoder_state_";
+ HTTP2_DVLOG(2) << "HpackDecoder::error_detected in decoder_state_";
error_detected_ = true;
}
}
@@ -110,9 +110,9 @@ size_t HpackDecoder::EstimateMemoryUsage() const {
}
void HpackDecoder::ReportError(Http2StringPiece error_message) {
- DVLOG(3) << "HpackDecoder::ReportError is new="
- << (!error_detected_ ? "true" : "false")
- << ", error_message: " << error_message;
+ HTTP2_DVLOG(3) << "HpackDecoder::ReportError is new="
+ << (!error_detected_ ? "true" : "false")
+ << ", error_message: " << error_message;
if (!error_detected_) {
error_detected_ = true;
decoder_state_.listener()->OnHeaderErrorDetected(error_message);
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.cc
index 2ddf421775d..921d48ca392 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.cc
@@ -4,9 +4,9 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/hpack/hpack_string.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_macros.h"
namespace http2 {
@@ -41,21 +41,21 @@ void HpackDecoderState::set_tables_debug_listener(
void HpackDecoderState::ApplyHeaderTableSizeSetting(
uint32_t header_table_size) {
- DVLOG(2) << "HpackDecoderState::ApplyHeaderTableSizeSetting("
- << header_table_size << ")";
+ HTTP2_DVLOG(2) << "HpackDecoderState::ApplyHeaderTableSizeSetting("
+ << header_table_size << ")";
DCHECK_LE(lowest_header_table_size_, final_header_table_size_);
if (header_table_size < lowest_header_table_size_) {
lowest_header_table_size_ = header_table_size;
}
final_header_table_size_ = header_table_size;
- DVLOG(2) << "low water mark: " << lowest_header_table_size_;
- DVLOG(2) << "final limit: " << final_header_table_size_;
+ HTTP2_DVLOG(2) << "low water mark: " << lowest_header_table_size_;
+ HTTP2_DVLOG(2) << "final limit: " << final_header_table_size_;
}
// Called to notify this object that we're starting to decode an HPACK block
// (e.g. a HEADERS or PUSH_PROMISE frame's header has been decoded).
void HpackDecoderState::OnHeaderBlockStart() {
- DVLOG(2) << "HpackDecoderState::OnHeaderBlockStart";
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnHeaderBlockStart";
// This instance can't be reused after an error has been detected, as we must
// assume that the encoder and decoder compression states are no longer
// synchronized.
@@ -72,14 +72,14 @@ void HpackDecoderState::OnHeaderBlockStart() {
(lowest_header_table_size_ <
decoder_tables_.current_header_table_size() ||
final_header_table_size_ < decoder_tables_.header_table_size_limit());
- DVLOG(2) << "HpackDecoderState::OnHeaderListStart "
- << "require_dynamic_table_size_update_="
- << require_dynamic_table_size_update_;
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnHeaderListStart "
+ << "require_dynamic_table_size_update_="
+ << require_dynamic_table_size_update_;
listener_->OnHeaderListStart();
}
void HpackDecoderState::OnIndexedHeader(size_t index) {
- DVLOG(2) << "HpackDecoderState::OnIndexedHeader: " << index;
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnIndexedHeader: " << index;
if (error_detected_) {
return;
}
@@ -101,8 +101,9 @@ void HpackDecoderState::OnNameIndexAndLiteralValue(
HpackEntryType entry_type,
size_t name_index,
HpackDecoderStringBuffer* value_buffer) {
- DVLOG(2) << "HpackDecoderState::OnNameIndexAndLiteralValue " << entry_type
- << ", " << name_index << ", " << value_buffer->str();
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnNameIndexAndLiteralValue "
+ << entry_type << ", " << name_index << ", "
+ << value_buffer->str();
if (error_detected_) {
return;
}
@@ -127,8 +128,8 @@ void HpackDecoderState::OnLiteralNameAndValue(
HpackEntryType entry_type,
HpackDecoderStringBuffer* name_buffer,
HpackDecoderStringBuffer* value_buffer) {
- DVLOG(2) << "HpackDecoderState::OnLiteralNameAndValue " << entry_type << ", "
- << name_buffer->str() << ", " << value_buffer->str();
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnLiteralNameAndValue " << entry_type
+ << ", " << name_buffer->str() << ", " << value_buffer->str();
if (error_detected_) {
return;
}
@@ -146,11 +147,11 @@ void HpackDecoderState::OnLiteralNameAndValue(
}
void HpackDecoderState::OnDynamicTableSizeUpdate(size_t size_limit) {
- DVLOG(2) << "HpackDecoderState::OnDynamicTableSizeUpdate " << size_limit
- << ", required="
- << (require_dynamic_table_size_update_ ? "true" : "false")
- << ", allowed="
- << (allow_dynamic_table_size_update_ ? "true" : "false");
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnDynamicTableSizeUpdate " << size_limit
+ << ", required="
+ << (require_dynamic_table_size_update_ ? "true" : "false")
+ << ", allowed="
+ << (allow_dynamic_table_size_update_ ? "true" : "false");
if (error_detected_) {
return;
}
@@ -185,14 +186,14 @@ void HpackDecoderState::OnDynamicTableSizeUpdate(size_t size_limit) {
}
void HpackDecoderState::OnHpackDecodeError(Http2StringPiece error_message) {
- DVLOG(2) << "HpackDecoderState::OnHpackDecodeError " << error_message;
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnHpackDecodeError " << error_message;
if (!error_detected_) {
ReportError(error_message);
}
}
void HpackDecoderState::OnHeaderBlockEnd() {
- DVLOG(2) << "HpackDecoderState::OnHeaderBlockEnd";
+ HTTP2_DVLOG(2) << "HpackDecoderState::OnHeaderBlockEnd";
if (error_detected_) {
return;
}
@@ -206,9 +207,9 @@ void HpackDecoderState::OnHeaderBlockEnd() {
}
void HpackDecoderState::ReportError(Http2StringPiece error_message) {
- DVLOG(2) << "HpackDecoderState::ReportError is new="
- << (!error_detected_ ? "true" : "false")
- << ", error_message: " << error_message;
+ HTTP2_DVLOG(2) << "HpackDecoderState::ReportError is new="
+ << (!error_detected_ ? "true" : "false")
+ << ", error_message: " << error_message;
if (!error_detected_) {
listener_->OnHeaderErrorDetected(error_message);
error_detected_ = true;
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state_test.cc
index 115827e1912..cbc4224fd81 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_state_test.cc
@@ -9,12 +9,12 @@
#include <utility>
#include <vector>
-#include "base/logging.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/hpack/hpack_string.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer.cc
index b20c37a8204..76431a6ffd0 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer.cc
@@ -6,9 +6,9 @@
#include <utility>
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_bug_tracker.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_estimate_memory_usage.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
namespace http2 {
@@ -57,12 +57,12 @@ HpackDecoderStringBuffer::HpackDecoderStringBuffer()
HpackDecoderStringBuffer::~HpackDecoderStringBuffer() = default;
void HpackDecoderStringBuffer::Reset() {
- DVLOG(3) << "HpackDecoderStringBuffer::Reset";
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::Reset";
state_ = State::RESET;
}
void HpackDecoderStringBuffer::Set(Http2StringPiece value, bool is_static) {
- DVLOG(2) << "HpackDecoderStringBuffer::Set";
+ HTTP2_DVLOG(2) << "HpackDecoderStringBuffer::Set";
DCHECK_EQ(state_, State::RESET);
value_ = value;
state_ = State::COMPLETE;
@@ -73,7 +73,7 @@ void HpackDecoderStringBuffer::Set(Http2StringPiece value, bool is_static) {
}
void HpackDecoderStringBuffer::OnStart(bool huffman_encoded, size_t len) {
- DVLOG(2) << "HpackDecoderStringBuffer::OnStart";
+ HTTP2_DVLOG(2) << "HpackDecoderStringBuffer::OnStart";
DCHECK_EQ(state_, State::RESET);
remaining_len_ = len;
@@ -106,8 +106,8 @@ void HpackDecoderStringBuffer::OnStart(bool huffman_encoded, size_t len) {
}
bool HpackDecoderStringBuffer::OnData(const char* data, size_t len) {
- DVLOG(2) << "HpackDecoderStringBuffer::OnData state=" << state_
- << ", backing=" << backing_;
+ HTTP2_DVLOG(2) << "HpackDecoderStringBuffer::OnData state=" << state_
+ << ", backing=" << backing_;
DCHECK_EQ(state_, State::COLLECTING);
DCHECK_LE(len, remaining_len_);
remaining_len_ -= len;
@@ -145,7 +145,7 @@ bool HpackDecoderStringBuffer::OnData(const char* data, size_t len) {
}
bool HpackDecoderStringBuffer::OnEnd() {
- DVLOG(2) << "HpackDecoderStringBuffer::OnEnd";
+ HTTP2_DVLOG(2) << "HpackDecoderStringBuffer::OnEnd";
DCHECK_EQ(state_, State::COLLECTING);
DCHECK_EQ(0u, remaining_len_);
@@ -164,11 +164,12 @@ bool HpackDecoderStringBuffer::OnEnd() {
}
void HpackDecoderStringBuffer::BufferStringIfUnbuffered() {
- DVLOG(3) << "HpackDecoderStringBuffer::BufferStringIfUnbuffered state="
- << state_ << ", backing=" << backing_;
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::BufferStringIfUnbuffered state="
+ << state_ << ", backing=" << backing_;
if (state_ != State::RESET && backing_ == Backing::UNBUFFERED) {
- DVLOG(2) << "HpackDecoderStringBuffer buffering Http2String of length "
- << value_.size();
+ HTTP2_DVLOG(2)
+ << "HpackDecoderStringBuffer buffering Http2String of length "
+ << value_.size();
buffer_.assign(value_.data(), value_.size());
if (state_ == State::COMPLETE) {
value_ = buffer_;
@@ -178,23 +179,23 @@ void HpackDecoderStringBuffer::BufferStringIfUnbuffered() {
}
bool HpackDecoderStringBuffer::IsBuffered() const {
- DVLOG(3) << "HpackDecoderStringBuffer::IsBuffered";
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::IsBuffered";
return state_ != State::RESET && backing_ == Backing::BUFFERED;
}
size_t HpackDecoderStringBuffer::BufferedLength() const {
- DVLOG(3) << "HpackDecoderStringBuffer::BufferedLength";
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::BufferedLength";
return IsBuffered() ? buffer_.size() : 0;
}
Http2StringPiece HpackDecoderStringBuffer::str() const {
- DVLOG(3) << "HpackDecoderStringBuffer::str";
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::str";
DCHECK_EQ(state_, State::COMPLETE);
return value_;
}
Http2String HpackDecoderStringBuffer::ReleaseString() {
- DVLOG(3) << "HpackDecoderStringBuffer::ReleaseString";
+ HTTP2_DVLOG(3) << "HpackDecoderStringBuffer::ReleaseString";
DCHECK_EQ(state_, State::COMPLETE);
DCHECK_EQ(backing_, Backing::BUFFERED);
if (state_ == State::COMPLETE) {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
index 009b894fbe6..11b0d9773bb 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
@@ -8,9 +8,9 @@
#include <initializer_list>
-#include "base/logging.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
@@ -31,10 +31,10 @@ class HpackDecoderStringBufferTest : public ::testing::Test {
State state() const { return buf_.state_for_testing(); }
Backing backing() const { return buf_.backing_for_testing(); }
- // We want to know that LOG(x) << buf_ will work in production should that
- // be needed, so we test that it outputs the expected values.
+ // We want to know that HTTP2_LOG(x) << buf_ will work in production should
+ // that be needed, so we test that it outputs the expected values.
AssertionResult VerifyLogHasSubstrs(std::initializer_list<Http2String> strs) {
- VLOG(1) << buf_;
+ HTTP2_VLOG(1) << buf_;
std::ostringstream ss;
buf_.OutputDebugStringTo(ss);
Http2String dbg_str(ss.str());
@@ -54,7 +54,7 @@ TEST_F(HpackDecoderStringBufferTest, SetStatic) {
EXPECT_TRUE(VerifyLogHasSubstrs({"state=RESET"}));
buf_.Set(data, /*is_static*/ true);
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_EQ(state(), State::COMPLETE);
EXPECT_EQ(backing(), Backing::STATIC);
EXPECT_EQ(data, buf_.str());
@@ -75,13 +75,13 @@ TEST_F(HpackDecoderStringBufferTest, SetStatic) {
TEST_F(HpackDecoderStringBufferTest, PlainWhole) {
Http2StringPiece data("some text.");
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_EQ(state(), State::RESET);
buf_.OnStart(/*huffman_encoded*/ false, data.size());
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::RESET);
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_TRUE(buf_.OnData(data.data(), data.size()));
EXPECT_EQ(state(), State::COLLECTING);
@@ -101,7 +101,7 @@ TEST_F(HpackDecoderStringBufferTest, PlainWhole) {
// Now force it to buffer the string, after which it will still have the same
// string value, but the backing store will be different.
buf_.BufferStringIfUnbuffered();
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(buf_.BufferedLength(), data.size());
EXPECT_EQ(data, buf_.str());
@@ -126,7 +126,7 @@ TEST_F(HpackDecoderStringBufferTest, PlainSplit) {
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(buf_.BufferedLength(), part1.size());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_TRUE(buf_.OnData(part2.data(), part2.size()));
EXPECT_EQ(state(), State::COLLECTING);
@@ -137,7 +137,7 @@ TEST_F(HpackDecoderStringBufferTest, PlainSplit) {
EXPECT_EQ(state(), State::COMPLETE);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(buf_.BufferedLength(), data.size());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
Http2StringPiece buffered = buf_.str();
EXPECT_EQ(data, buffered);
@@ -188,31 +188,31 @@ TEST_F(HpackDecoderStringBufferTest, HuffmanSplit) {
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(0u, buf_.BufferedLength());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_TRUE(buf_.OnData(part1.data(), part1.size()));
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_GT(buf_.BufferedLength(), 0u);
EXPECT_LT(buf_.BufferedLength(), decoded.size());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_TRUE(buf_.OnData(part2.data(), part2.size()));
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(buf_.BufferedLength(), decoded.size());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
EXPECT_TRUE(buf_.OnEnd());
EXPECT_EQ(state(), State::COMPLETE);
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_EQ(buf_.BufferedLength(), decoded.size());
EXPECT_EQ(decoded, buf_.str());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
buf_.Reset();
EXPECT_EQ(state(), State::RESET);
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
}
TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnData) {
@@ -226,7 +226,7 @@ TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnData) {
EXPECT_EQ(state(), State::COLLECTING);
EXPECT_EQ(backing(), Backing::BUFFERED);
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
}
TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnEnd) {
@@ -241,7 +241,7 @@ TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnEnd) {
EXPECT_EQ(backing(), Backing::BUFFERED);
EXPECT_FALSE(buf_.OnEnd());
- LOG(INFO) << buf_;
+ HTTP2_LOG(INFO) << buf_;
}
// TODO(jamessynge): Add tests for ReleaseString().
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.cc
index c88648ff597..09a18a8a03f 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.cc
@@ -4,8 +4,8 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
namespace {
@@ -60,7 +60,8 @@ HpackDecoderDynamicTable::HpackDecoderDynamicTable()
HpackDecoderDynamicTable::~HpackDecoderDynamicTable() = default;
void HpackDecoderDynamicTable::DynamicTableSizeUpdate(size_t size_limit) {
- DVLOG(3) << "HpackDecoderDynamicTable::DynamicTableSizeUpdate " << size_limit;
+ HTTP2_DVLOG(3) << "HpackDecoderDynamicTable::DynamicTableSizeUpdate "
+ << size_limit;
EnsureSizeNoMoreThan(size_limit);
DCHECK_LE(current_size_, size_limit);
size_limit_ = size_limit;
@@ -72,12 +73,12 @@ bool HpackDecoderDynamicTable::Insert(const HpackString& name,
const HpackString& value) {
HpackDecoderTableEntry entry(name, value);
size_t entry_size = entry.size();
- DVLOG(2) << "InsertEntry of size=" << entry_size << "\n name: " << name
- << "\n value: " << value;
+ HTTP2_DVLOG(2) << "InsertEntry of size=" << entry_size
+ << "\n name: " << name << "\n value: " << value;
if (entry_size > size_limit_) {
- DVLOG(2) << "InsertEntry: entry larger than table, removing "
- << table_.size() << " entries, of total size " << current_size_
- << " bytes.";
+ HTTP2_DVLOG(2) << "InsertEntry: entry larger than table, removing "
+ << table_.size() << " entries, of total size "
+ << current_size_ << " bytes.";
table_.clear();
current_size_ = 0;
return false; // Not inserted because too large.
@@ -85,14 +86,14 @@ bool HpackDecoderDynamicTable::Insert(const HpackString& name,
++insert_count_;
if (debug_listener_ != nullptr) {
entry.time_added = debug_listener_->OnEntryInserted(entry, insert_count_);
- DVLOG(2) << "OnEntryInserted returned time_added=" << entry.time_added
- << " for insert_count_=" << insert_count_;
+ HTTP2_DVLOG(2) << "OnEntryInserted returned time_added=" << entry.time_added
+ << " for insert_count_=" << insert_count_;
}
size_t insert_limit = size_limit_ - entry_size;
EnsureSizeNoMoreThan(insert_limit);
table_.push_front(entry);
current_size_ += entry_size;
- DVLOG(2) << "InsertEntry: current_size_=" << current_size_;
+ HTTP2_DVLOG(2) << "InsertEntry: current_size_=" << current_size_;
DCHECK_GE(current_size_, entry_size);
DCHECK_LE(current_size_, size_limit_);
return true;
@@ -112,8 +113,8 @@ const HpackStringPair* HpackDecoderDynamicTable::Lookup(size_t index) const {
}
void HpackDecoderDynamicTable::EnsureSizeNoMoreThan(size_t limit) {
- DVLOG(2) << "EnsureSizeNoMoreThan limit=" << limit
- << ", current_size_=" << current_size_;
+ HTTP2_DVLOG(2) << "EnsureSizeNoMoreThan limit=" << limit
+ << ", current_size_=" << current_size_;
// Not the most efficient choice, but any easy way to start.
while (current_size_ > limit) {
RemoveLastEntry();
@@ -124,8 +125,8 @@ void HpackDecoderDynamicTable::EnsureSizeNoMoreThan(size_t limit) {
void HpackDecoderDynamicTable::RemoveLastEntry() {
DCHECK(!table_.empty());
if (!table_.empty()) {
- DVLOG(2) << "RemoveLastEntry current_size_=" << current_size_
- << ", last entry size=" << table_.back().size();
+ HTTP2_DVLOG(2) << "RemoveLastEntry current_size_=" << current_size_
+ << ", last entry size=" << table_.back().size();
DCHECK_GE(current_size_, table_.back().size());
current_size_ -= table_.back().size();
table_.pop_back();
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables_test.cc
index a54fa5f053b..592ce563544 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables_test.cc
@@ -8,10 +8,10 @@
#include <tuple>
#include <vector>
-#include "base/logging.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_test.cc
index 83a0ede3a5f..bf2cee52c8d 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_test.cc
@@ -10,7 +10,6 @@
#include <utility>
#include <vector>
-#include "base/logging.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
@@ -22,6 +21,7 @@
#include "net/third_party/quiche/src/http2/hpack/tools/hpack_block_builder.h"
#include "net/third_party/quiche/src/http2/hpack/tools/hpack_example.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -130,7 +130,7 @@ class HpackDecoderTest : public ::testing::TestWithParam<bool>,
}
AssertionResult DecodeBlock(Http2StringPiece block) {
- VLOG(1) << "HpackDecoderTest::DecodeBlock";
+ HTTP2_VLOG(1) << "HpackDecoderTest::DecodeBlock";
VERIFY_FALSE(decoder_.error_detected());
VERIFY_TRUE(error_messages_.empty());
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.cc
index 9d17465577f..327075df7ee 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.cc
@@ -4,10 +4,10 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_collector.h"
-#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_string_collector.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.cc
index 96b9f066030..5e1bd8c7176 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.cc
@@ -8,9 +8,8 @@
#include <cstdint>
-#include "base/logging.h"
-#include "base/macros.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_bug_tracker.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_macros.h"
namespace http2 {
@@ -98,7 +97,8 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
switch (state_) {
case EntryDecoderState::kResumeDecodingType:
// entry_type_decoder_ returned kDecodeInProgress when last called.
- DVLOG(1) << "kResumeDecodingType: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kResumeDecodingType: db->Remaining="
+ << db->Remaining();
status = entry_type_decoder_.Resume(db);
if (status != DecodeStatus::kDecodeDone) {
return status;
@@ -109,7 +109,7 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
case EntryDecoderState::kDecodedType:
// entry_type_decoder_ returned kDecodeDone, now need to decide how
// to proceed.
- DVLOG(1) << "kDecodedType: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kDecodedType: db->Remaining=" << db->Remaining();
if (DispatchOnType(listener)) {
// All done.
return DecodeStatus::kDecodeDone;
@@ -117,7 +117,8 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
continue;
case EntryDecoderState::kStartDecodingName:
- DVLOG(1) << "kStartDecodingName: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kStartDecodingName: db->Remaining="
+ << db->Remaining();
{
NameDecoderListener ncb(listener);
status = string_decoder_.Start(db, &ncb);
@@ -134,7 +135,8 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
HTTP2_FALLTHROUGH;
case EntryDecoderState::kStartDecodingValue:
- DVLOG(1) << "kStartDecodingValue: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kStartDecodingValue: db->Remaining="
+ << db->Remaining();
{
ValueDecoderListener vcb(listener);
status = string_decoder_.Start(db, &vcb);
@@ -153,7 +155,8 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
case EntryDecoderState::kResumeDecodingName:
// The literal name was split across decode buffers.
- DVLOG(1) << "kResumeDecodingName: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kResumeDecodingName: db->Remaining="
+ << db->Remaining();
{
NameDecoderListener ncb(listener);
status = string_decoder_.Resume(db, &ncb);
@@ -171,7 +174,8 @@ DecodeStatus HpackEntryDecoder::Resume(DecodeBuffer* db,
case EntryDecoderState::kResumeDecodingValue:
// The literal value was split across decode buffers.
- DVLOG(1) << "kResumeDecodingValue: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(1) << "kResumeDecodingValue: db->Remaining="
+ << db->Remaining();
{
ValueDecoderListener vcb(listener);
status = string_decoder_.Resume(db, &vcb);
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h
index fe59d964841..5858c1e82e6 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder.h
@@ -10,7 +10,6 @@
// must provide a non-empty decode buffer. Continue with calls to Resume() if
// Start, and any subsequent calls to Resume, returns kDecodeInProgress.
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.h"
@@ -18,6 +17,7 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.cc
index b783b150da8..a0571c47769 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.cc
@@ -4,12 +4,12 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_decoder_listener.h"
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
void HpackEntryDecoderVLoggingListener::OnIndexedHeader(size_t index) {
- VLOG(1) << "OnIndexedHeader, index=" << index;
+ HTTP2_VLOG(1) << "OnIndexedHeader, index=" << index;
if (wrapped_) {
wrapped_->OnIndexedHeader(index);
}
@@ -18,8 +18,8 @@ void HpackEntryDecoderVLoggingListener::OnIndexedHeader(size_t 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;
+ HTTP2_VLOG(1) << "OnStartLiteralHeader: entry_type=" << entry_type
+ << ", maybe_name_index=" << maybe_name_index;
if (wrapped_) {
wrapped_->OnStartLiteralHeader(entry_type, maybe_name_index);
}
@@ -27,7 +27,7 @@ void HpackEntryDecoderVLoggingListener::OnStartLiteralHeader(
void HpackEntryDecoderVLoggingListener::OnNameStart(bool huffman_encoded,
size_t len) {
- VLOG(1) << "OnNameStart: H=" << huffman_encoded << ", len=" << len;
+ HTTP2_VLOG(1) << "OnNameStart: H=" << huffman_encoded << ", len=" << len;
if (wrapped_) {
wrapped_->OnNameStart(huffman_encoded, len);
}
@@ -35,14 +35,14 @@ void HpackEntryDecoderVLoggingListener::OnNameStart(bool huffman_encoded,
void HpackEntryDecoderVLoggingListener::OnNameData(const char* data,
size_t len) {
- VLOG(1) << "OnNameData: len=" << len;
+ HTTP2_VLOG(1) << "OnNameData: len=" << len;
if (wrapped_) {
wrapped_->OnNameData(data, len);
}
}
void HpackEntryDecoderVLoggingListener::OnNameEnd() {
- VLOG(1) << "OnNameEnd";
+ HTTP2_VLOG(1) << "OnNameEnd";
if (wrapped_) {
wrapped_->OnNameEnd();
}
@@ -50,7 +50,7 @@ void HpackEntryDecoderVLoggingListener::OnNameEnd() {
void HpackEntryDecoderVLoggingListener::OnValueStart(bool huffman_encoded,
size_t len) {
- VLOG(1) << "OnValueStart: H=" << huffman_encoded << ", len=" << len;
+ HTTP2_VLOG(1) << "OnValueStart: H=" << huffman_encoded << ", len=" << len;
if (wrapped_) {
wrapped_->OnValueStart(huffman_encoded, len);
}
@@ -58,21 +58,21 @@ void HpackEntryDecoderVLoggingListener::OnValueStart(bool huffman_encoded,
void HpackEntryDecoderVLoggingListener::OnValueData(const char* data,
size_t len) {
- VLOG(1) << "OnValueData: len=" << len;
+ HTTP2_VLOG(1) << "OnValueData: len=" << len;
if (wrapped_) {
wrapped_->OnValueData(data, len);
}
}
void HpackEntryDecoderVLoggingListener::OnValueEnd() {
- VLOG(1) << "OnValueEnd";
+ HTTP2_VLOG(1) << "OnValueEnd";
if (wrapped_) {
wrapped_->OnValueEnd();
}
}
void HpackEntryDecoderVLoggingListener::OnDynamicTableSizeUpdate(size_t size) {
- VLOG(1) << "OnDynamicTableSizeUpdate: size=" << size;
+ HTTP2_VLOG(1) << "OnDynamicTableSizeUpdate: size=" << size;
if (wrapped_) {
wrapped_->OnDynamicTableSizeUpdate(size);
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.cc
index 121e3d0b02c..7519f5a07b8 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.cc
@@ -4,8 +4,8 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_bug_tracker.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h
index 79898becbef..092a8440f90 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder.h
@@ -12,12 +12,12 @@
#include <cstdint>
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
#include "net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder_test.cc
index afff7cc629d..60248f3326f 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_entry_type_decoder_test.cc
@@ -6,9 +6,9 @@
#include <vector>
-#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/hpack/tools/hpack_block_builder.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
#include "net/third_party/quiche/src/http2/tools/random_decoder_test.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h
index 2128728e9d1..e30b36dc0bd 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder.h
@@ -14,12 +14,11 @@
#include <algorithm>
#include <cstdint>
-#include "base/logging.h"
-#include "base/macros.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_macros.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
@@ -82,7 +81,8 @@ class HTTP2_EXPORT_PRIVATE HpackStringDecoder {
while (true) {
switch (state_) {
case kStartDecodingLength:
- DVLOG(2) << "kStartDecodingLength: db->Remaining=" << db->Remaining();
+ HTTP2_DVLOG(2) << "kStartDecodingLength: db->Remaining="
+ << db->Remaining();
if (!StartDecodingLength(db, cb, &status)) {
// The length is split across decode buffers.
return status;
@@ -99,13 +99,13 @@ class HTTP2_EXPORT_PRIVATE HpackStringDecoder {
HTTP2_FALLTHROUGH;
case kDecodingString:
- DVLOG(2) << "kDecodingString: db->Remaining=" << db->Remaining()
- << " remaining_=" << remaining_;
+ HTTP2_DVLOG(2) << "kDecodingString: db->Remaining=" << db->Remaining()
+ << " remaining_=" << remaining_;
return DecodeString(db, cb);
case kResumeDecodingLength:
- DVLOG(2) << "kResumeDecodingLength: db->Remaining="
- << db->Remaining();
+ HTTP2_DVLOG(2) << "kResumeDecodingLength: db->Remaining="
+ << db->Remaining();
if (!ResumeDecodingLength(db, cb, &status)) {
return status;
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.cc
index e0fbc657ef9..7a132e400a6 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.cc
@@ -4,14 +4,14 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_listener.h"
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
namespace test {
void HpackStringDecoderVLoggingListener::OnStringStart(bool huffman_encoded,
size_t len) {
- VLOG(1) << "OnStringStart: H=" << huffman_encoded << ", len=" << len;
+ HTTP2_VLOG(1) << "OnStringStart: H=" << huffman_encoded << ", len=" << len;
if (wrapped_) {
wrapped_->OnStringStart(huffman_encoded, len);
}
@@ -19,14 +19,14 @@ void HpackStringDecoderVLoggingListener::OnStringStart(bool huffman_encoded,
void HpackStringDecoderVLoggingListener::OnStringData(const char* data,
size_t len) {
- VLOG(1) << "OnStringData: len=" << len;
+ HTTP2_VLOG(1) << "OnStringData: len=" << len;
if (wrapped_) {
return wrapped_->OnStringData(data, len);
}
}
void HpackStringDecoderVLoggingListener::OnStringEnd() {
- VLOG(1) << "OnStringEnd";
+ HTTP2_VLOG(1) << "OnStringEnd";
if (wrapped_) {
return wrapped_->OnStringEnd();
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_test.cc
index 349b649d211..53469998d14 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_string_decoder_test.cc
@@ -38,13 +38,13 @@ class HpackStringDecoderTest : public RandomDecoderTest {
DecodeStatus ResumeDecoding(DecodeBuffer* b) override {
// Provides coverage of DebugString and StateToString.
// Not validating output.
- VLOG(1) << decoder_.DebugString();
- VLOG(2) << collector_;
+ HTTP2_VLOG(1) << decoder_.DebugString();
+ HTTP2_VLOG(2) << collector_;
return decoder_.Resume(b, &listener_);
}
AssertionResult Collected(Http2StringPiece s, bool huffman_encoded) {
- VLOG(1) << collector_;
+ HTTP2_VLOG(1) << collector_;
return collector_.Collected(s, huffman_encoded);
}
@@ -64,9 +64,9 @@ class HpackStringDecoderTest : public RandomDecoderTest {
VERIFY_NE(collector_,
HpackStringCollector(expected_str, expected_huffman));
}
- VLOG(2) << collector_.ToString();
+ HTTP2_VLOG(2) << collector_.ToString();
collector_.Clear();
- VLOG(2) << collector_;
+ HTTP2_VLOG(2) << collector_;
return result;
};
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.cc b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.cc
index b3e29b176cc..dea6698faa6 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.cc
@@ -4,8 +4,8 @@
#include "net/third_party/quiche/src/http2/hpack/decoder/hpack_whole_entry_buffer.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_estimate_memory_usage.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_macros.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
@@ -37,26 +37,26 @@ size_t HpackWholeEntryBuffer::EstimateMemoryUsage() const {
}
void HpackWholeEntryBuffer::OnIndexedHeader(size_t index) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnIndexedHeader: index=" << index;
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnIndexedHeader: index=" << index;
listener_->OnIndexedHeader(index);
}
void HpackWholeEntryBuffer::OnStartLiteralHeader(HpackEntryType entry_type,
size_t maybe_name_index) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnStartLiteralHeader: entry_type="
- << entry_type << ", maybe_name_index=" << maybe_name_index;
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnStartLiteralHeader: entry_type="
+ << entry_type << ", maybe_name_index=" << maybe_name_index;
entry_type_ = entry_type;
maybe_name_index_ = maybe_name_index;
}
void HpackWholeEntryBuffer::OnNameStart(bool huffman_encoded, size_t len) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnNameStart: huffman_encoded="
- << (huffman_encoded ? "true" : "false") << ", len=" << len;
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnNameStart: huffman_encoded="
+ << (huffman_encoded ? "true" : "false") << ", len=" << len;
DCHECK_EQ(maybe_name_index_, 0u);
if (!error_detected_) {
if (len > max_string_size_bytes_) {
- DVLOG(1) << "Name length (" << len << ") is longer than permitted ("
- << max_string_size_bytes_ << ")";
+ HTTP2_DVLOG(1) << "Name length (" << len << ") is longer than permitted ("
+ << max_string_size_bytes_ << ")";
ReportError("HPACK entry name size is too long.");
return;
}
@@ -65,8 +65,9 @@ void HpackWholeEntryBuffer::OnNameStart(bool huffman_encoded, size_t len) {
}
void HpackWholeEntryBuffer::OnNameData(const char* data, size_t len) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnNameData: len=" << len << " data:\n"
- << Http2HexDump(Http2StringPiece(data, len));
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnNameData: len=" << len
+ << " data:\n"
+ << Http2HexDump(Http2StringPiece(data, len));
DCHECK_EQ(maybe_name_index_, 0u);
if (!error_detected_ && !name_.OnData(data, len)) {
ReportError("Error decoding HPACK entry name.");
@@ -74,7 +75,7 @@ void HpackWholeEntryBuffer::OnNameData(const char* data, size_t len) {
}
void HpackWholeEntryBuffer::OnNameEnd() {
- DVLOG(2) << "HpackWholeEntryBuffer::OnNameEnd";
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnNameEnd";
DCHECK_EQ(maybe_name_index_, 0u);
if (!error_detected_ && !name_.OnEnd()) {
ReportError("Error decoding HPACK entry name.");
@@ -82,12 +83,13 @@ void HpackWholeEntryBuffer::OnNameEnd() {
}
void HpackWholeEntryBuffer::OnValueStart(bool huffman_encoded, size_t len) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnValueStart: huffman_encoded="
- << (huffman_encoded ? "true" : "false") << ", len=" << len;
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnValueStart: huffman_encoded="
+ << (huffman_encoded ? "true" : "false") << ", len=" << len;
if (!error_detected_) {
if (len > max_string_size_bytes_) {
- DVLOG(1) << "Value length (" << len << ") is longer than permitted ("
- << max_string_size_bytes_ << ")";
+ HTTP2_DVLOG(1) << "Value length (" << len
+ << ") is longer than permitted (" << max_string_size_bytes_
+ << ")";
ReportError("HPACK entry value size is too long.");
return;
}
@@ -96,15 +98,16 @@ void HpackWholeEntryBuffer::OnValueStart(bool huffman_encoded, size_t len) {
}
void HpackWholeEntryBuffer::OnValueData(const char* data, size_t len) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnValueData: len=" << len << " data:\n"
- << Http2HexDump(Http2StringPiece(data, len));
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnValueData: len=" << len
+ << " data:\n"
+ << Http2HexDump(Http2StringPiece(data, len));
if (!error_detected_ && !value_.OnData(data, len)) {
ReportError("Error decoding HPACK entry value.");
}
}
void HpackWholeEntryBuffer::OnValueEnd() {
- DVLOG(2) << "HpackWholeEntryBuffer::OnValueEnd";
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnValueEnd";
if (error_detected_) {
return;
}
@@ -123,13 +126,14 @@ void HpackWholeEntryBuffer::OnValueEnd() {
}
void HpackWholeEntryBuffer::OnDynamicTableSizeUpdate(size_t size) {
- DVLOG(2) << "HpackWholeEntryBuffer::OnDynamicTableSizeUpdate: size=" << size;
+ HTTP2_DVLOG(2) << "HpackWholeEntryBuffer::OnDynamicTableSizeUpdate: size="
+ << size;
listener_->OnDynamicTableSizeUpdate(size);
}
void HpackWholeEntryBuffer::ReportError(Http2StringPiece error_message) {
if (!error_detected_) {
- DVLOG(1) << "HpackWholeEntryBuffer::ReportError: " << error_message;
+ HTTP2_DVLOG(1) << "HpackWholeEntryBuffer::ReportError: " << error_message;
error_detected_ = true;
listener_->OnHpackDecodeError(error_message);
listener_ = HpackWholeEntryNoOpListener::NoOpListener();
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/hpack_string.cc b/chromium/net/third_party/quiche/src/http2/hpack/hpack_string.cc
index 58bb821810e..957cffa62d7 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/hpack_string.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/hpack_string.cc
@@ -6,7 +6,7 @@
#include <utility>
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
namespace http2 {
@@ -47,16 +47,16 @@ std::ostream& operator<<(std::ostream& out, const HpackString& v) {
HpackStringPair::HpackStringPair(const HpackString& name,
const HpackString& value)
: name(name), value(value) {
- DVLOG(3) << DebugString() << " ctor";
+ HTTP2_DVLOG(3) << DebugString() << " ctor";
}
HpackStringPair::HpackStringPair(Http2StringPiece name, Http2StringPiece value)
: name(name), value(value) {
- DVLOG(3) << DebugString() << " ctor";
+ HTTP2_DVLOG(3) << DebugString() << " ctor";
}
HpackStringPair::~HpackStringPair() {
- DVLOG(3) << DebugString() << " dtor";
+ HTTP2_DVLOG(3) << DebugString() << " dtor";
}
Http2String HpackStringPair::DebugString() const {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/hpack_string_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/hpack_string_test.cc
index 87f5975886d..898ef8d1fd1 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/hpack_string_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/hpack_string_test.cc
@@ -8,8 +8,8 @@
#include <utility>
-#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
using ::testing::AssertionFailure;
@@ -140,8 +140,8 @@ TEST_F(HpackStringTest, MoveConstructor) {
EXPECT_TRUE(VerifyEqual(&hs0, ""));
EXPECT_TRUE(VerifyNotEqual(&hs1, ""));
- LOG(INFO) << hs0;
- LOG(INFO) << hs1;
+ HTTP2_LOG(INFO) << hs0;
+ HTTP2_LOG(INFO) << hs1;
}
} // namespace
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/http2_hpack_constants_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/http2_hpack_constants_test.cc
index 5b20b186efd..b266554961c 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/http2_hpack_constants_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/http2_hpack_constants_test.cc
@@ -4,10 +4,11 @@
#include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
-#include "base/logging.h"
+#include <sstream>
+
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "net/third_party/quiche/src/http2/platform/api/http2_mock_log.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
namespace test {
@@ -30,40 +31,34 @@ TEST(HpackEntryTypeTest, HpackEntryTypeToString) {
TEST(HpackEntryTypeTest, OutputHpackEntryType) {
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "kIndexedHeader");
- LOG(INFO) << HpackEntryType::kIndexedHeader;
+ std::stringstream log;
+ log << HpackEntryType::kIndexedHeader;
+ EXPECT_EQ("kIndexedHeader", log.str());
}
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "kDynamicTableSizeUpdate");
- LOG(INFO) << HpackEntryType::kDynamicTableSizeUpdate;
+ std::stringstream log;
+ log << HpackEntryType::kDynamicTableSizeUpdate;
+ EXPECT_EQ("kDynamicTableSizeUpdate", log.str());
}
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "kIndexedLiteralHeader");
- LOG(INFO) << HpackEntryType::kIndexedLiteralHeader;
+ std::stringstream log;
+ log << HpackEntryType::kIndexedLiteralHeader;
+ EXPECT_EQ("kIndexedLiteralHeader", log.str());
}
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "kUnindexedLiteralHeader");
- LOG(INFO) << HpackEntryType::kUnindexedLiteralHeader;
+ std::stringstream log;
+ log << HpackEntryType::kUnindexedLiteralHeader;
+ EXPECT_EQ("kUnindexedLiteralHeader", log.str());
}
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "kNeverIndexedLiteralHeader");
- LOG(INFO) << HpackEntryType::kNeverIndexedLiteralHeader;
+ std::stringstream log;
+ log << HpackEntryType::kNeverIndexedLiteralHeader;
+ EXPECT_EQ("kNeverIndexedLiteralHeader", log.str());
}
{
- CREATE_HTTP2_MOCK_LOG(log);
- log.StartCapturingLogs();
- EXPECT_HTTP2_LOG_CALL_CONTAINS(log, INFO, "UnknownHpackEntryType(1234321)");
- LOG(INFO) << static_cast<HpackEntryType>(1234321);
+ std::stringstream log;
+ log << static_cast<HpackEntryType>(1234321);
+ EXPECT_EQ("UnknownHpackEntryType(1234321)", log.str());
}
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.cc
index d1076ed3c07..e74ca143403 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.cc
@@ -7,7 +7,7 @@
#include <bitset>
#include <limits>
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
// Terminology:
//
@@ -415,13 +415,13 @@ HpackHuffmanDecoder::HpackHuffmanDecoder() = default;
HpackHuffmanDecoder::~HpackHuffmanDecoder() = default;
bool HpackHuffmanDecoder::Decode(Http2StringPiece input, Http2String* output) {
- DVLOG(1) << "HpackHuffmanDecoder::Decode";
+ HTTP2_DVLOG(1) << "HpackHuffmanDecoder::Decode";
// Fill bit_buffer_ from input.
input.remove_prefix(bit_buffer_.AppendBytes(input));
while (true) {
- DVLOG(3) << "Enter Decode Loop, bit_buffer_: " << bit_buffer_;
+ HTTP2_DVLOG(3) << "Enter Decode Loop, bit_buffer_: " << bit_buffer_;
if (bit_buffer_.count() >= 7) {
// Get high 7 bits of the bit buffer, see if that contains a complete
// code of 5, 6 or 7 bits.
@@ -447,10 +447,10 @@ bool HpackHuffmanDecoder::Decode(Http2StringPiece input, Http2String* output) {
}
HuffmanCode code_prefix = bit_buffer_.value() >> kExtraAccumulatorBitCount;
- DVLOG(3) << "code_prefix: " << HuffmanCodeBitSet(code_prefix);
+ HTTP2_DVLOG(3) << "code_prefix: " << HuffmanCodeBitSet(code_prefix);
PrefixInfo prefix_info = PrefixToInfo(code_prefix);
- DVLOG(3) << "prefix_info: " << prefix_info;
+ HTTP2_DVLOG(3) << "prefix_info: " << prefix_info;
DCHECK_LE(kMinCodeBitCount, prefix_info.code_length);
DCHECK_LE(prefix_info.code_length, kMaxCodeBitCount);
@@ -465,8 +465,8 @@ bool HpackHuffmanDecoder::Decode(Http2StringPiece input, Http2String* output) {
continue;
}
// Encoder is not supposed to explicity encode the EOS symbol.
- DLOG(ERROR) << "EOS explicitly encoded!\n " << bit_buffer_ << "\n "
- << prefix_info;
+ HTTP2_DLOG(ERROR) << "EOS explicitly encoded!\n " << bit_buffer_ << "\n "
+ << prefix_info;
return false;
}
// bit_buffer_ doesn't have enough bits in it to decode the next symbol.
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder_test.cc
index 6c07ca5b55b..30b586fd2a6 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder_test.cc
@@ -8,7 +8,6 @@
#include <iostream>
-#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.cc
index 9f561eedf46..a92a4c0ed7c 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.cc
@@ -4,8 +4,8 @@
#include "net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.h"
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/hpack/huffman/huffman_spec_tables.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
// TODO(jamessynge): Remove use of binary literals, that is a C++ 14 feature.
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder_test.cc
index ccb6983bc66..2a8999fd3a8 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder_test.cc
@@ -4,7 +4,6 @@
#include "net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_encoder.h"
-#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_arraysize.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/tools/hpack_example.cc b/chromium/net/third_party/quiche/src/http2/hpack/tools/hpack_example.cc
index d20eb354260..d7b8c7c6739 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/tools/hpack_example.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/tools/hpack_example.cc
@@ -6,8 +6,8 @@
#include <ctype.h>
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_bug_tracker.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.cc
index ac85247f370..9741a23cbdd 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.cc
@@ -103,8 +103,9 @@ DecodeStatus HpackVarintDecoder::Resume(DecodeBuffer* db) {
}
// Signal error if value is too large or there are too many extension bytes.
- DLOG(WARNING) << "Variable length int encoding is too large or too long. "
- << DebugString();
+ HTTP2_DLOG(WARNING)
+ << "Variable length int encoding is too large or too long. "
+ << DebugString();
MarkDone();
return DecodeStatus::kDecodeError;
}
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h
index 5c99b5c194b..855ced449ab 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h
+++ b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h
@@ -30,10 +30,10 @@
#include <cstdint>
#include <limits>
-#include "base/logging.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder_test.cc
index 2d589fd7e60..16101262df8 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder_test.cc
@@ -8,9 +8,9 @@
#include <stddef.h>
-#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_arraysize.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/tools/random_decoder_test.h"
@@ -108,7 +108,8 @@ class HpackVarintDecoderTest : public RandomDecoderTest,
};
INSTANTIATE_TEST_SUITE_P(
- HpackVarintDecoderTest, HpackVarintDecoderTest,
+ HpackVarintDecoderTest,
+ HpackVarintDecoderTest,
::testing::Combine(
// Bits of the first byte not part of the prefix should be ignored.
::testing::Values(0b00000000, 0b11111111, 0b10101010),
@@ -259,11 +260,11 @@ struct {
};
TEST_P(HpackVarintDecoderTest, Success) {
- for (size_t i = 0; i < HTTP2_ARRAYSIZE(kSuccessTestData); ++i) {
- DecodeExpectSuccess(Http2HexDecode(kSuccessTestData[i].data),
- kSuccessTestData[i].prefix_length,
- kSuccessTestData[i].expected_value);
- }
+ for (size_t i = 0; i < HTTP2_ARRAYSIZE(kSuccessTestData); ++i) {
+ DecodeExpectSuccess(Http2HexDecode(kSuccessTestData[i].data),
+ kSuccessTestData[i].prefix_length,
+ kSuccessTestData[i].expected_value);
+ }
}
struct {
@@ -300,10 +301,10 @@ struct {
{"ff80feffffffffffffff8100", 8}};
TEST_P(HpackVarintDecoderTest, Error) {
- for (size_t i = 0; i < HTTP2_ARRAYSIZE(kErrorTestData); ++i) {
- DecodeExpectError(Http2HexDecode(kErrorTestData[i].data),
- kErrorTestData[i].prefix_length);
- }
+ for (size_t i = 0; i < HTTP2_ARRAYSIZE(kErrorTestData); ++i) {
+ DecodeExpectError(Http2HexDecode(kErrorTestData[i].data),
+ kErrorTestData[i].prefix_length);
+ }
}
} // namespace
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.cc b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.cc
index d3685d988cd..2e7ad3e2597 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.cc
@@ -4,7 +4,7 @@
#include "net/third_party/quiche/src/http2/hpack/varint/hpack_varint_encoder.h"
-#include "base/logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
namespace http2 {
diff --git a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_round_trip_test.cc b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_round_trip_test.cc
index cd26553284f..594317b3866 100644
--- a/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_round_trip_test.cc
+++ b/chromium/net/third_party/quiche/src/http2/hpack/varint/hpack_varint_round_trip_test.cc
@@ -13,9 +13,9 @@
#include <set>
#include <vector>
-#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/hpack/tools/hpack_block_builder.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/tools/random_decoder_test.h"
@@ -167,9 +167,9 @@ class HpackVarintRoundTripTest : public RandomDecoderTest {
Http2HexDump(buffer_));
if (value == minimum) {
- LOG(INFO) << "Checking minimum; " << msg;
+ HTTP2_LOG(INFO) << "Checking minimum; " << msg;
} else if (value == maximum) {
- LOG(INFO) << "Checking maximum; " << msg;
+ HTTP2_LOG(INFO) << "Checking maximum; " << msg;
}
SCOPED_TRACE(msg);
@@ -206,13 +206,15 @@ class HpackVarintRoundTripTest : public RandomDecoderTest {
const uint8_t prefix_mask = (1 << prefix_length) - 1;
const uint64_t beyond = start + range;
- LOG(INFO) << "############################################################";
- LOG(INFO) << "prefix_length=" << static_cast<int>(prefix_length);
- LOG(INFO) << "prefix_mask=" << std::hex << static_cast<int>(prefix_mask);
- LOG(INFO) << "start=" << start << " (" << std::hex << start << ")";
- LOG(INFO) << "range=" << range << " (" << std::hex << range << ")";
- LOG(INFO) << "beyond=" << beyond << " (" << std::hex << beyond << ")";
- LOG(INFO) << "expected_bytes=" << expected_bytes;
+ HTTP2_LOG(INFO)
+ << "############################################################";
+ HTTP2_LOG(INFO) << "prefix_length=" << static_cast<int>(prefix_length);
+ HTTP2_LOG(INFO) << "prefix_mask=" << std::hex
+ << static_cast<int>(prefix_mask);
+ HTTP2_LOG(INFO) << "start=" << start << " (" << std::hex << start << ")";
+ HTTP2_LOG(INFO) << "range=" << range << " (" << std::hex << range << ")";
+ HTTP2_LOG(INFO) << "beyond=" << beyond << " (" << std::hex << beyond << ")";
+ HTTP2_LOG(INFO) << "expected_bytes=" << expected_bytes;
if (expected_bytes < 11) {
// Confirm the claim that beyond requires more bytes.
@@ -243,7 +245,7 @@ class HpackVarintRoundTripTest : public RandomDecoderTest {
uint8_t prefix_length_;
};
-// To help me and future debuggers of varint encodings, this LOGs out the
+// To help me and future debuggers of varint encodings, this HTTP2_LOGs out the
// transition points where a new extension byte is added.
TEST_F(HpackVarintRoundTripTest, Encode) {
for (int prefix_length = 3; prefix_length <= 8; ++prefix_length) {
@@ -258,11 +260,12 @@ TEST_F(HpackVarintRoundTripTest, Encode) {
const uint64_t i = HiValueOfExtensionBytes(8, prefix_length);
const uint64_t j = HiValueOfExtensionBytes(9, prefix_length);
- LOG(INFO) << "############################################################";
- LOG(INFO) << "prefix_length=" << prefix_length << " a=" << a
- << " b=" << b << " c=" << c << " d=" << d << " e=" << e
- << " f=" << f << " g=" << g << " h=" << h << " i=" << i
- << " j=" << j;
+ HTTP2_LOG(INFO)
+ << "############################################################";
+ HTTP2_LOG(INFO) << "prefix_length=" << prefix_length << " a=" << a
+ << " b=" << b << " c=" << c << " d=" << d
+ << " e=" << e << " f=" << f << " g=" << g
+ << " h=" << h << " i=" << i << " j=" << j;
std::vector<uint64_t> values = {
0, 1, // Force line break.
@@ -281,8 +284,8 @@ TEST_F(HpackVarintRoundTripTest, Encode) {
for (uint64_t value : values) {
EncodeNoRandom(value, prefix_length);
Http2String dump = Http2HexDump(buffer_);
- LOG(INFO) << Http2StringPrintf("%10llu %0#18x ", value, value)
- << Http2HexDump(buffer_).substr(7);
+ HTTP2_LOG(INFO) << Http2StringPrintf("%10llu %0#18x ", value, value)
+ << Http2HexDump(buffer_).substr(7);
}
}
}