Replace QuicheStringPiece with absl::string_view
PiperOrigin-RevId: 336141637
Change-Id: I00b8a60d5298747936a8503a3cfcc5942680f817
diff --git a/quic/core/qpack/qpack_instruction_decoder.h b/quic/core/qpack/qpack_instruction_decoder.h
index 08eb665..c6df1f3 100644
--- a/quic/core/qpack/qpack_instruction_decoder.h
+++ b/quic/core/qpack/qpack_instruction_decoder.h
@@ -9,11 +9,11 @@
#include <cstdint>
#include <string>
+#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/http2/hpack/huffman/hpack_huffman_decoder.h"
#include "net/third_party/quiche/src/http2/hpack/varint/hpack_varint_decoder.h"
#include "net/third_party/quiche/src/quic/core/qpack/qpack_instructions.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
namespace quic {
@@ -42,7 +42,7 @@
// No more data is processed afterwards.
// Implementations are allowed to destroy the QpackInstructionDecoder
// instance synchronously.
- virtual void OnError(quiche::QuicheStringPiece error_message) = 0;
+ virtual void OnError(absl::string_view error_message) = 0;
};
// Both |*language| and |*delegate| must outlive this object.
@@ -54,7 +54,7 @@
// Provide a data fragment to decode. Must not be called after an error has
// occurred. Must not be called with empty |data|. Return true on success,
// false on error (in which case Delegate::OnError() is called synchronously).
- bool Decode(quiche::QuicheStringPiece data);
+ bool Decode(absl::string_view data);
// Returns true if no decoding has taken place yet or if the last instruction
// has been entirely parsed.
@@ -94,13 +94,13 @@
// data and set |*bytes_consumed| to the number of octets processed. Some
// take input data but do not consume any bytes. Some do not take any
// arguments because they only change internal state.
- bool DoStartInstruction(quiche::QuicheStringPiece data);
+ bool DoStartInstruction(absl::string_view data);
bool DoStartField();
- bool DoReadBit(quiche::QuicheStringPiece data);
- bool DoVarintStart(quiche::QuicheStringPiece data, size_t* bytes_consumed);
- bool DoVarintResume(quiche::QuicheStringPiece data, size_t* bytes_consumed);
+ bool DoReadBit(absl::string_view data);
+ bool DoVarintStart(absl::string_view data, size_t* bytes_consumed);
+ bool DoVarintResume(absl::string_view data, size_t* bytes_consumed);
bool DoVarintDone();
- bool DoReadString(quiche::QuicheStringPiece data, size_t* bytes_consumed);
+ bool DoReadString(absl::string_view data, size_t* bytes_consumed);
bool DoReadStringDone();
// Identify instruction based on opcode encoded in |byte|.
@@ -108,7 +108,7 @@
const QpackInstruction* LookupOpcode(uint8_t byte) const;
// Stops decoding and calls Delegate::OnError().
- void OnError(quiche::QuicheStringPiece error_message);
+ void OnError(absl::string_view error_message);
// Describes the language used for decoding.
const QpackLanguage* const language_;