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

Side by Side Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 1660533002: Landing Recent QUIC changes until 01/26/2016 18:14 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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_dispatcher.cc ('k') | net/tools/quic/quic_packet_writer_wrapper.h » ('j') | 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/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
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_packet_writer_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698