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_crypto_stream.h" | 5 #include "net/quic/quic_crypto_stream.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace net { | 22 namespace net { |
23 namespace test { | 23 namespace test { |
24 namespace { | 24 namespace { |
25 | 25 |
26 class MockQuicCryptoStream : public QuicCryptoStream { | 26 class MockQuicCryptoStream : public QuicCryptoStream { |
27 public: | 27 public: |
28 explicit MockQuicCryptoStream(QuicSession* session) | 28 explicit MockQuicCryptoStream(QuicSession* session) |
29 : QuicCryptoStream(session) { | 29 : QuicCryptoStream(session) { |
30 } | 30 } |
31 | 31 |
32 virtual void OnHandshakeMessage( | 32 void OnHandshakeMessage(const CryptoHandshakeMessage& message) override { |
33 const CryptoHandshakeMessage& message) override { | |
34 messages_.push_back(message); | 33 messages_.push_back(message); |
35 } | 34 } |
36 | 35 |
37 vector<CryptoHandshakeMessage>* messages() { | 36 vector<CryptoHandshakeMessage>* messages() { |
38 return &messages_; | 37 return &messages_; |
39 } | 38 } |
40 | 39 |
41 private: | 40 private: |
42 vector<CryptoHandshakeMessage> messages_; | 41 vector<CryptoHandshakeMessage> messages_; |
43 | 42 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } else { | 107 } else { |
109 EXPECT_TRUE(stream_.flow_controller()->IsEnabled()); | 108 EXPECT_TRUE(stream_.flow_controller()->IsEnabled()); |
110 } | 109 } |
111 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 110 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
112 &stream_)); | 111 &stream_)); |
113 } | 112 } |
114 | 113 |
115 } // namespace | 114 } // namespace |
116 } // namespace test | 115 } // namespace test |
117 } // namespace net | 116 } // namespace net |
OLD | NEW |