gfe-relnote: Migrate //gfe/test_tools/request_tools/clients/... from char* and size_t signatures to absl::string_view, a better and more modern representation of a view into a string buffer; changes the minimum number of tests to get successful compilation and runs
Asan run of all e2e tests: http://sponge2/f6536624-0275-40d6-a307-4ffd63b43284
Steps in the process:
1. Migrate Send to use a string_view, using a pass-thru method to avoid changing tests <<< This CL
2. Use a regex to migrate all Send callsites to use a string_view, Rosie this out
3. Remove passthru method
PiperOrigin-RevId: 286244043
Change-Id: I1e2141f7cb2473cc57ecdc837b54b8cf344eba61
diff --git a/quic/test_tools/quic_test_client.cc b/quic/test_tools/quic_test_client.cc
index 77d87ea..9657c8b 100644
--- a/quic/test_tools/quic_test_client.cc
+++ b/quic/test_tools/quic_test_client.cc
@@ -672,8 +672,8 @@
return true;
}
-ssize_t QuicTestClient::Send(const void* buffer, size_t size) {
- return SendData(std::string(static_cast<const char*>(buffer), size), false);
+ssize_t QuicTestClient::Send(absl::string_view data) {
+ return SendData(std::string(data), false);
}
bool QuicTestClient::response_headers_complete() const {
diff --git a/quic/test_tools/quic_test_client.h b/quic/test_tools/quic_test_client.h
index 91273b1..baeff71 100644
--- a/quic/test_tools/quic_test_client.h
+++ b/quic/test_tools/quic_test_client.h
@@ -156,7 +156,7 @@
QuicSocketAddress local_address() const;
void ClearPerRequestState();
bool WaitUntil(int timeout_ms, std::function<bool()> trigger);
- ssize_t Send(const void* buffer, size_t size);
+ ssize_t Send(absl::string_view data);
bool connected() const;
bool buffer_body() const;
void set_buffer_body(bool buffer_body);