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/quic/quic_session.h" | 5 #include "net/quic/quic_session.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 session_->MarkWriteBlocked(stream_id_, kSomeMiddlePriority); | 107 session_->MarkWriteBlocked(stream_id_, kSomeMiddlePriority); |
108 } | 108 } |
109 | 109 |
110 private: | 110 private: |
111 QuicSession* const session_; | 111 QuicSession* const session_; |
112 const QuicStreamId stream_id_; | 112 const QuicStreamId stream_id_; |
113 }; | 113 }; |
114 | 114 |
115 class TestSession : public QuicSession { | 115 class TestSession : public QuicSession { |
116 public: | 116 public: |
117 explicit TestSession(QuicConnection* connection, | 117 TestSession(QuicConnection* connection, |
118 uint32 max_initial_flow_control_window) | 118 uint32 max_initial_flow_control_window) |
119 : QuicSession(connection, max_initial_flow_control_window, | 119 : QuicSession(connection, max_initial_flow_control_window, |
120 DefaultQuicConfig()), | 120 DefaultQuicConfig()), |
121 crypto_stream_(this), | 121 crypto_stream_(this), |
122 writev_consumes_all_data_(false) {} | 122 writev_consumes_all_data_(false) {} |
123 | 123 |
124 virtual TestCryptoStream* GetCryptoStream() OVERRIDE { | 124 virtual TestCryptoStream* GetCryptoStream() OVERRIDE { |
125 return &crypto_stream_; | 125 return &crypto_stream_; |
126 } | 126 } |
127 | 127 |
128 virtual TestStream* CreateOutgoingDataStream() OVERRIDE { | 128 virtual TestStream* CreateOutgoingDataStream() OVERRIDE { |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 const uint32 kSmallerFlowControlWindow = kDefaultFlowControlSendWindow - 1; | 668 const uint32 kSmallerFlowControlWindow = kDefaultFlowControlSendWindow - 1; |
669 TestSession session(connection, kSmallerFlowControlWindow); | 669 TestSession session(connection, kSmallerFlowControlWindow); |
670 | 670 |
671 EXPECT_EQ(kDefaultFlowControlSendWindow, | 671 EXPECT_EQ(kDefaultFlowControlSendWindow, |
672 session.max_flow_control_receive_window_bytes()); | 672 session.max_flow_control_receive_window_bytes()); |
673 } | 673 } |
674 | 674 |
675 } // namespace | 675 } // namespace |
676 } // namespace test | 676 } // namespace test |
677 } // namespace net | 677 } // namespace net |
OLD | NEW |