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/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 class BlockingWriter : public QuicPacketWriterWrapper { | 572 class BlockingWriter : public QuicPacketWriterWrapper { |
573 public: | 573 public: |
574 BlockingWriter() : write_blocked_(false) {} | 574 BlockingWriter() : write_blocked_(false) {} |
575 | 575 |
576 bool IsWriteBlocked() const override { return write_blocked_; } | 576 bool IsWriteBlocked() const override { return write_blocked_; } |
577 void SetWritable() override { write_blocked_ = false; } | 577 void SetWritable() override { write_blocked_ = false; } |
578 | 578 |
579 WriteResult WritePacket(const char* buffer, | 579 WriteResult WritePacket(const char* buffer, |
580 size_t buf_len, | 580 size_t buf_len, |
581 const IPAddressNumber& self_client_address, | 581 const IPAddressNumber& self_client_address, |
582 const IPEndPoint& peer_client_address) override { | 582 const IPEndPoint& peer_client_address, |
| 583 PerPacketOptions* options) override { |
583 // It would be quite possible to actually implement this method here with | 584 // It would be quite possible to actually implement this method here with |
584 // the fake blocked status, but it would be significantly more work in | 585 // the fake blocked status, but it would be significantly more work in |
585 // Chromium, and since it's not called anyway, don't bother. | 586 // Chromium, and since it's not called anyway, don't bother. |
586 LOG(DFATAL) << "Not supported"; | 587 LOG(DFATAL) << "Not supported"; |
587 return WriteResult(); | 588 return WriteResult(); |
588 } | 589 } |
589 | 590 |
590 bool write_blocked_; | 591 bool write_blocked_; |
591 }; | 592 }; |
592 | 593 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 762 |
762 // And we'll resume where we left off when we get another call. | 763 // And we'll resume where we left off when we get another call. |
763 EXPECT_CALL(*connection2(), OnCanWrite()); | 764 EXPECT_CALL(*connection2(), OnCanWrite()); |
764 dispatcher_.OnCanWrite(); | 765 dispatcher_.OnCanWrite(); |
765 EXPECT_FALSE(dispatcher_.HasPendingWrites()); | 766 EXPECT_FALSE(dispatcher_.HasPendingWrites()); |
766 } | 767 } |
767 | 768 |
768 } // namespace | 769 } // namespace |
769 } // namespace test | 770 } // namespace test |
770 } // namespace net | 771 } // namespace net |
OLD | NEW |