OLD | NEW |
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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 527 } |
528 | 528 |
529 size_t QuicTestClient::bytes_read() const { | 529 size_t QuicTestClient::bytes_read() const { |
530 return bytes_read_; | 530 return bytes_read_; |
531 } | 531 } |
532 | 532 |
533 size_t QuicTestClient::bytes_written() const { | 533 size_t QuicTestClient::bytes_written() const { |
534 return bytes_written_; | 534 return bytes_written_; |
535 } | 535 } |
536 | 536 |
537 void QuicTestClient::OnClose(QuicDataStream* stream) { | 537 void QuicTestClient::OnClose(QuicSpdyStream* stream) { |
538 if (stream != nullptr) { | 538 if (stream != nullptr) { |
539 // Always close the stream, regardless of whether it was the last stream | 539 // Always close the stream, regardless of whether it was the last stream |
540 // written. | 540 // written. |
541 client()->OnClose(stream); | 541 client()->OnClose(stream); |
542 } | 542 } |
543 if (stream_ != stream) { | 543 if (stream_ != stream) { |
544 return; | 544 return; |
545 } | 545 } |
546 if (buffer_body()) { | 546 if (buffer_body()) { |
547 // TODO(fnk): The stream still buffers the whole thing. Fix that. | 547 // TODO(fnk): The stream still buffers the whole thing. Fix that. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 message->headers()->SetRequestVersion( | 635 message->headers()->SetRequestVersion( |
636 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); | 636 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); |
637 message->headers()->SetRequestMethod( | 637 message->headers()->SetRequestMethod( |
638 HTTPMessage::MethodToString(HttpConstants::GET)); | 638 HTTPMessage::MethodToString(HttpConstants::GET)); |
639 message->headers()->SetRequestUri(uri); | 639 message->headers()->SetRequestUri(uri); |
640 } | 640 } |
641 | 641 |
642 } // namespace test | 642 } // namespace test |
643 } // namespace tools | 643 } // namespace tools |
644 } // namespace net | 644 } // namespace net |
OLD | NEW |