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

Side by Side Diff: net/quic/test_tools/quic_test_writer.h

Issue 127633002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/quic/test_tools/quic_test_writer.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_ 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_ 6 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "net/quic/quic_packet_writer.h" 9 #include "net/quic/quic_packet_writer.h"
10 10
11 namespace net { 11 namespace net {
12 namespace test { 12 namespace test {
13 13
14 // Allows setting a writer for a QuicConnection, to allow 14 // Allows setting a writer for a QuicConnection, to allow
15 // fine-grained control of writes. 15 // fine-grained control of writes.
16 class QuicTestWriter : public QuicPacketWriter { 16 class QuicTestWriter : public QuicPacketWriter {
17 public: 17 public:
18 QuicTestWriter(); 18 QuicTestWriter();
19 virtual ~QuicTestWriter(); 19 virtual ~QuicTestWriter();
20
21 virtual bool IsWriteBlocked() const OVERRIDE;
22 virtual void SetWritable() OVERRIDE;
23
20 // Takes ownership of |writer|. 24 // Takes ownership of |writer|.
21 void set_writer(QuicPacketWriter* writer); 25 void set_writer(QuicPacketWriter* writer);
22 26
23 protected: 27 protected:
24 QuicPacketWriter* writer(); 28 QuicPacketWriter* writer();
25 29
26 private: 30 private:
27 scoped_ptr<QuicPacketWriter> writer_; 31 scoped_ptr<QuicPacketWriter> writer_;
28 }; 32 };
29 33
30 } // namespace test 34 } // namespace test
31 } // namespace net 35 } // namespace net
32 36
33 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_ 37 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_WRITER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/quic/test_tools/quic_test_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698