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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 1776423004: Only MarkTrailersConsumed when actually sending trailers notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add internal changes and fix tests Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/test_tools/quic_test_client.h" 5 #include "net/tools/quic/test_tools/quic_test_client.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/cert/cert_verify_result.h" 10 #include "net/cert/cert_verify_result.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (stream_ != stream) { 564 if (stream_ != stream) {
565 return; 565 return;
566 } 566 }
567 if (buffer_body()) { 567 if (buffer_body()) {
568 // TODO(fnk): The stream still buffers the whole thing. Fix that. 568 // TODO(fnk): The stream still buffers the whole thing. Fix that.
569 response_ = stream_->data(); 569 response_ = stream_->data();
570 } 570 }
571 response_complete_ = true; 571 response_complete_ = true;
572 response_headers_complete_ = stream_->headers_decompressed(); 572 response_headers_complete_ = stream_->headers_decompressed();
573 SpdyBalsaUtils::SpdyHeadersToResponseHeaders(stream_->headers(), &headers_); 573 SpdyBalsaUtils::SpdyHeadersToResponseHeaders(stream_->headers(), &headers_);
574 response_trailers_ = stream_->trailers(); 574 response_trailers_ = stream_->response_trailers();
575 stream_error_ = stream_->stream_error(); 575 stream_error_ = stream_->stream_error();
576 bytes_read_ = stream_->stream_bytes_read() + stream_->header_bytes_read(); 576 bytes_read_ = stream_->stream_bytes_read() + stream_->header_bytes_read();
577 bytes_written_ = 577 bytes_written_ =
578 stream_->stream_bytes_written() + stream_->header_bytes_written(); 578 stream_->stream_bytes_written() + stream_->header_bytes_written();
579 response_header_size_ = headers_.GetSizeForWriteBuffer(); 579 response_header_size_ = headers_.GetSizeForWriteBuffer();
580 response_body_size_ = stream_->data().size(); 580 response_body_size_ = stream_->data().size();
581 stream_ = nullptr; 581 stream_ = nullptr;
582 ++num_responses_; 582 ++num_responses_;
583 } 583 }
584 584
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 CHECK(message); 674 CHECK(message);
675 message->headers()->SetRequestVersion( 675 message->headers()->SetRequestVersion(
676 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); 676 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1));
677 message->headers()->SetRequestMethod( 677 message->headers()->SetRequestMethod(
678 HTTPMessage::MethodToString(HttpConstants::GET)); 678 HTTPMessage::MethodToString(HttpConstants::GET));
679 message->headers()->SetRequestUri(uri); 679 message->headers()->SetRequestUri(uri);
680 } 680 }
681 681
682 } // namespace test 682 } // namespace test
683 } // namespace net 683 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698