Remove Http2StringPiece; use QuicheStringPiece instead.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 285412823
Change-Id: I907a65813e890ce153b93fe5f07721efb3ecc195
diff --git a/http2/test_tools/frame_parts.cc b/http2/test_tools/frame_parts.cc
index d9dffa1..32d3a97 100644
--- a/http2/test_tools/frame_parts.cc
+++ b/http2/test_tools/frame_parts.cc
@@ -51,14 +51,15 @@
HTTP2_VLOG(1) << "FrameParts, header: " << frame_header_;
}
-FrameParts::FrameParts(const Http2FrameHeader& header, Http2StringPiece payload)
+FrameParts::FrameParts(const Http2FrameHeader& header,
+ quiche::QuicheStringPiece payload)
: FrameParts(header) {
HTTP2_VLOG(1) << "FrameParts with payload.size() = " << payload.size();
this->payload_.append(payload.data(), payload.size());
opt_payload_length_ = payload.size();
}
FrameParts::FrameParts(const Http2FrameHeader& header,
- Http2StringPiece payload,
+ quiche::QuicheStringPiece payload,
size_t total_pad_length)
: FrameParts(header, payload) {
HTTP2_VLOG(1) << "FrameParts with total_pad_length=" << total_pad_length;
@@ -117,8 +118,8 @@
}
}
-void FrameParts::SetAltSvcExpected(Http2StringPiece origin,
- Http2StringPiece value) {
+void FrameParts::SetAltSvcExpected(quiche::QuicheStringPiece origin,
+ quiche::QuicheStringPiece value) {
altsvc_origin_.append(origin.data(), origin.size());
altsvc_value_.append(value.data(), value.size());
opt_altsvc_origin_length_ = origin.size();
@@ -140,7 +141,7 @@
HTTP2_VLOG(1) << "OnDataPayload: len=" << len
<< "; frame_header_: " << frame_header_;
ASSERT_TRUE(InFrameOfType(Http2FrameType::DATA)) << *this;
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &payload_,
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len), &payload_,
&opt_payload_length_));
}
@@ -172,7 +173,7 @@
ASSERT_TRUE(got_start_callback_);
ASSERT_FALSE(got_end_callback_);
ASSERT_TRUE(FrameCanHaveHpackPayload(frame_header_)) << *this;
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &payload_,
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len), &payload_,
&opt_payload_length_));
}
@@ -216,8 +217,8 @@
HTTP2_VLOG(1) << "OnPadding: skipped_length=" << skipped_length;
ASSERT_TRUE(InPaddedFrame()) << *this;
ASSERT_TRUE(opt_pad_length_);
- ASSERT_TRUE(AppendString(Http2StringPiece(pad, skipped_length), &padding_,
- &opt_pad_length_));
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(pad, skipped_length),
+ &padding_, &opt_pad_length_));
}
void FrameParts::OnRstStream(const Http2FrameHeader& header,
@@ -313,7 +314,7 @@
void FrameParts::OnGoAwayOpaqueData(const char* data, size_t len) {
HTTP2_VLOG(1) << "OnGoAwayOpaqueData: len=" << len;
ASSERT_TRUE(InFrameOfType(Http2FrameType::GOAWAY)) << *this;
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &payload_,
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len), &payload_,
&opt_payload_length_));
}
@@ -348,14 +349,14 @@
void FrameParts::OnAltSvcOriginData(const char* data, size_t len) {
HTTP2_VLOG(1) << "OnAltSvcOriginData: len=" << len;
ASSERT_TRUE(InFrameOfType(Http2FrameType::ALTSVC)) << *this;
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &altsvc_origin_,
- &opt_altsvc_origin_length_));
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len),
+ &altsvc_origin_, &opt_altsvc_origin_length_));
}
void FrameParts::OnAltSvcValueData(const char* data, size_t len) {
HTTP2_VLOG(1) << "OnAltSvcValueData: len=" << len;
ASSERT_TRUE(InFrameOfType(Http2FrameType::ALTSVC)) << *this;
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &altsvc_value_,
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len), &altsvc_value_,
&opt_altsvc_value_length_));
}
@@ -378,7 +379,7 @@
ASSERT_FALSE(IsSupportedHttp2FrameType(frame_header_.type)) << *this;
ASSERT_TRUE(got_start_callback_);
ASSERT_FALSE(got_end_callback_);
- ASSERT_TRUE(AppendString(Http2StringPiece(data, len), &payload_,
+ ASSERT_TRUE(AppendString(quiche::QuicheStringPiece(data, len), &payload_,
&opt_payload_length_));
}
@@ -506,7 +507,7 @@
return AssertionSuccess();
}
-AssertionResult FrameParts::AppendString(Http2StringPiece source,
+AssertionResult FrameParts::AppendString(quiche::QuicheStringPiece source,
std::string* target,
Http2Optional<size_t>* opt_length) {
target->append(source.data(), source.size());