Replace quiche::QuicheStringPiece with absl::string_view.
PiperOrigin-RevId: 336819830
Change-Id: Ib3e47a9e3ad9c563a60434b41be492e85e6e4038
diff --git a/http2/hpack/hpack_string.h b/http2/hpack/hpack_string.h
index 6789187..3af2348 100644
--- a/http2/hpack/hpack_string.h
+++ b/http2/hpack/hpack_string.h
@@ -15,15 +15,15 @@
#include <iosfwd>
#include <string>
+#include "absl/strings/string_view.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_export.h"
-#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
namespace http2 {
class QUICHE_EXPORT_PRIVATE HpackString {
public:
explicit HpackString(const char* data);
- explicit HpackString(quiche::QuicheStringPiece str);
+ explicit HpackString(absl::string_view str);
explicit HpackString(std::string str);
HpackString(const HpackString& other);
@@ -34,31 +34,30 @@
size_t size() const { return str_.size(); }
const std::string& ToString() const { return str_; }
- quiche::QuicheStringPiece ToStringPiece() const;
+ absl::string_view ToStringPiece() const;
bool operator==(const HpackString& other) const;
- bool operator==(quiche::QuicheStringPiece str) const;
+ bool operator==(absl::string_view str) const;
private:
std::string str_;
};
-QUICHE_EXPORT_PRIVATE bool operator==(quiche::QuicheStringPiece a,
+QUICHE_EXPORT_PRIVATE bool operator==(absl::string_view a,
const HpackString& b);
-QUICHE_EXPORT_PRIVATE bool operator!=(quiche::QuicheStringPiece a,
+QUICHE_EXPORT_PRIVATE bool operator!=(absl::string_view a,
const HpackString& b);
QUICHE_EXPORT_PRIVATE bool operator!=(const HpackString& a,
const HpackString& b);
QUICHE_EXPORT_PRIVATE bool operator!=(const HpackString& a,
- quiche::QuicheStringPiece b);
+ absl::string_view b);
QUICHE_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
const HpackString& v);
struct QUICHE_EXPORT_PRIVATE HpackStringPair {
HpackStringPair(const HpackString& name, const HpackString& value);
- HpackStringPair(quiche::QuicheStringPiece name,
- quiche::QuicheStringPiece value);
+ HpackStringPair(absl::string_view name, absl::string_view value);
~HpackStringPair();
// Returns the size of a header entry with this name and value, per the RFC: