Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3294)

Unified Diff: net/quic/test_tools/quic_test_utils.h

Issue 2517673002: Move test only MakeIOVector method to test_tools/quic_test_utils.h. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.h
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index 17c4e56850f433e26a7a007c43257078066d4e29..58e54ca24c68058884eb16442b0e6096aa229bd6 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -24,6 +24,7 @@
#include "net/quic/core/quic_client_push_promise_index.h"
#include "net/quic/core/quic_connection.h"
#include "net/quic/core/quic_framer.h"
+#include "net/quic/core/quic_iovector.h"
#include "net/quic/core/quic_protocol.h"
#include "net/quic/core/quic_sent_packet_manager_interface.h"
#include "net/quic/core/quic_server_session_base.h"
@@ -1047,6 +1048,15 @@ QuicHeaderList AsHeaderList(const T& container) {
return l;
}
+// Utility function that returns an QuicIOVector object wrapped around |str|.
+// // |str|'s data is stored in |iov|.
+inline QuicIOVector MakeIOVector(base::StringPiece str, struct iovec* iov) {
+ iov->iov_base = const_cast<char*>(str.data());
+ iov->iov_len = static_cast<size_t>(str.size());
+ QuicIOVector quic_iov(iov, 1, str.size());
+ return quic_iov;
+}
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/core/quic_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698