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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 76723002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation error Created 7 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/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index 8f3570e8358ab66f41e798c7e88439c63c380a1f..577d12f4b879414db728d5b437be1f9c252f56c2 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -316,6 +316,8 @@ void QuicTestClient::ClearPerRequestState() {
stream_error_ = QUIC_STREAM_NO_ERROR;
stream_ = NULL;
response_ = "";
+ response_complete_ = false;
+ response_headers_complete_ = false;
headers_.Clear();
bytes_read_ = 0;
bytes_written_ = 0;
@@ -370,6 +372,22 @@ ssize_t QuicTestClient::Send(const void *buffer, size_t size) {
return SendData(string(static_cast<const char*>(buffer), size), false);
}
+bool QuicTestClient::response_headers_complete() const {
+ if (stream_ != NULL) {
+ return stream_->headers_decompressed();
+ } else {
+ return response_headers_complete_;
+ }
+}
+
+const BalsaHeaders* QuicTestClient::response_headers() const {
+ if (stream_ != NULL) {
+ return &stream_->headers();
+ } else {
+ return &headers_;
+ }
+}
+
int QuicTestClient::response_size() const {
return bytes_read_;
}
@@ -390,6 +408,8 @@ void QuicTestClient::OnClose(ReliableQuicStream* stream) {
// TODO(fnk): The stream still buffers the whole thing. Fix that.
response_ = stream_->data();
}
+ response_complete_ = true;
+ response_headers_complete_ = stream_->headers_decompressed();
headers_.CopyFrom(stream_->headers());
stream_error_ = stream_->stream_error();
bytes_read_ = stream_->stream_bytes_read();
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698