Remove Http2String wrapper for std::string.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 263816460
Change-Id: I4f365540414e6a3d78fd00ce6b39a4cdd4c14140
diff --git a/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc b/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc
index 6a4bee5..354fdae 100644
--- a/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc
@@ -6,13 +6,14 @@
#include <stddef.h>
+#include <string>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/http2_frame_decoder_listener.h"
#include "net/third_party/quiche/src/http2/decoder/payload_decoders/payload_decoder_base_test_util.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -103,8 +104,8 @@
::testing::Values(0, 1, 3, 65537)));
TEST_P(AltSvcPayloadLengthTests, ValidOriginAndValueLength) {
- Http2String origin = Random().RandString(origin_length_);
- Http2String value = Random().RandString(value_length_);
+ std::string origin = Random().RandString(origin_length_);
+ std::string value = Random().RandString(value_length_);
Http2FrameBuilder fb;
fb.Append(Http2AltSvcFields{origin_length_});
fb.Append(origin);
diff --git a/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc b/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc
index 35479a1..125e16f 100644
--- a/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include <string>
#include <type_traits>
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/tools/random_decoder_test.h"
@@ -73,7 +73,7 @@
::testing::Values(0, 1, 2, 3, 4, 5, 6));
TEST_P(ContinuationPayloadDecoderTest, ValidLength) {
- Http2String hpack_payload = Random().RandString(length_);
+ std::string hpack_payload = Random().RandString(length_);
Http2FrameHeader frame_header(length_, Http2FrameType::CONTINUATION,
RandFlags(), RandStreamId());
set_frame_header(frame_header);
diff --git a/http2/decoder/payload_decoders/data_payload_decoder_test.cc b/http2/decoder/payload_decoders/data_payload_decoder_test.cc
index 1cae714..f1dc017 100644
--- a/http2/decoder/payload_decoders/data_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/data_payload_decoder_test.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <string>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/http2_frame_decoder_listener.h"
#include "net/third_party/quiche/src/http2/decoder/payload_decoders/payload_decoder_base_test_util.h"
@@ -13,7 +15,6 @@
#include "net/third_party/quiche/src/http2/http2_structures.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.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/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
@@ -84,7 +85,7 @@
Reset();
uint8_t flags = RandFlags();
- Http2String data_payload = Random().RandString(data_size);
+ std::string data_payload = Random().RandString(data_size);
frame_builder_.Append(data_payload);
MaybeAppendTrailingPadding();
diff --git a/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc b/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc
index 5ea533a..b2d96fb 100644
--- a/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc
@@ -6,13 +6,14 @@
#include <stddef.h>
+#include <string>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/http2_frame_decoder_listener.h"
#include "net/third_party/quiche/src/http2/decoder/payload_decoders/payload_decoder_base_test_util.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -92,7 +93,7 @@
TEST_P(GoAwayOpaqueDataLengthTests, ValidLength) {
Http2GoAwayFields goaway;
Randomize(&goaway, RandomPtr());
- Http2String opaque_data = Random().RandString(length_);
+ std::string opaque_data = Random().RandString(length_);
Http2FrameBuilder fb;
fb.Append(goaway);
fb.Append(opaque_data);
diff --git a/http2/decoder/payload_decoders/headers_payload_decoder_test.cc b/http2/decoder/payload_decoders/headers_payload_decoder_test.cc
index a7a90bf..4e0f2e3 100644
--- a/http2/decoder/payload_decoders/headers_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/headers_payload_decoder_test.cc
@@ -6,13 +6,14 @@
#include <stddef.h>
+#include <string>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/http2_frame_decoder_listener.h"
#include "net/third_party/quiche/src/http2/decoder/payload_decoders/payload_decoder_base_test_util.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -116,7 +117,7 @@
frame_builder_.Append(priority);
}
- Http2String hpack_payload = Random().RandString(hpack_size);
+ std::string hpack_payload = Random().RandString(hpack_size);
frame_builder_.Append(hpack_payload);
MaybeAppendTrailingPadding();
diff --git a/http2/decoder/payload_decoders/payload_decoder_base_test_util.h b/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
index 66dd88a..5de0d1b 100644
--- a/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
+++ b/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
@@ -9,6 +9,8 @@
#include <stddef.h>
+#include <string>
+
#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"
@@ -19,7 +21,6 @@
#include "net/third_party/quiche/src/http2/http2_structures.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_reconstruct_object.h"
-#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/tools/http2_frame_builder.h"
@@ -429,7 +430,7 @@
}
HTTP2_VLOG(1) << "payload_length=" << payload_length;
- Http2String payload = fb.buffer().substr(0, payload_length);
+ std::string payload = fb.buffer().substr(0, payload_length);
// The missing length is the amount we cut off the end, unless
// payload_length is zero, in which case the decoder knows only that 1
diff --git a/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc b/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc
index 64dd935..0561aa4 100644
--- a/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc
@@ -6,13 +6,14 @@
#include <stddef.h>
+#include <string>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/http2_frame_decoder_listener.h"
#include "net/third_party/quiche/src/http2/decoder/payload_decoders/payload_decoder_base_test_util.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -98,7 +99,7 @@
HTTP2_LOG(INFO) << "########### hpack_size = " << hpack_size
<< " ###########";
Reset();
- Http2String hpack_payload = Random().RandString(hpack_size);
+ std::string hpack_payload = Random().RandString(hpack_size);
Http2PushPromiseFields push_promise{RandStreamId()};
frame_builder_.Append(push_promise);
frame_builder_.Append(hpack_payload);
diff --git a/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc b/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc
index 018bd82..1075932 100644
--- a/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc
+++ b/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include <string>
#include <type_traits>
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,7 +15,6 @@
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures.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/test_tools/frame_parts.h"
#include "net/third_party/quiche/src/http2/test_tools/frame_parts_collector.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
@@ -83,7 +83,7 @@
::testing::Values(0, 1, 2, 3, 255, 256));
TEST_P(UnknownPayloadDecoderTest, ValidLength) {
- Http2String unknown_payload = Random().RandString(length_);
+ std::string unknown_payload = Random().RandString(length_);
Http2FrameHeader frame_header(length_, g_unknown_frame_type, Random().Rand8(),
RandStreamId());
set_frame_header(frame_header);