| 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/test_tools/quic_test_utils.h" | 5 #include "net/quic/test_tools/quic_test_utils.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/sha1.h" | 10 #include "base/sha1.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 delete connection(); | 369 delete connection(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 // static | 372 // static |
| 373 QuicConsumedData MockQuicSession::ConsumeAllData( | 373 QuicConsumedData MockQuicSession::ConsumeAllData( |
| 374 QuicStream* /*stream*/, | 374 QuicStream* /*stream*/, |
| 375 QuicStreamId /*id*/, | 375 QuicStreamId /*id*/, |
| 376 const QuicIOVector& data, | 376 const QuicIOVector& data, |
| 377 QuicStreamOffset /*offset*/, | 377 QuicStreamOffset /*offset*/, |
| 378 bool fin, | 378 bool fin, |
| 379 QuicAckListenerInterface* /*ack_notifier_delegate*/) { | 379 const scoped_refptr<QuicAckListenerInterface>& /*ack_notifier_delegate*/) { |
| 380 return QuicConsumedData(data.total_length, fin); | 380 return QuicConsumedData(data.total_length, fin); |
| 381 } | 381 } |
| 382 | 382 |
| 383 MockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection) | 383 MockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection) |
| 384 : QuicSpdySession(connection, nullptr, DefaultQuicConfig()) { | 384 : QuicSpdySession(connection, nullptr, DefaultQuicConfig()) { |
| 385 crypto_stream_.reset(new QuicCryptoStream(this)); | 385 crypto_stream_.reset(new QuicCryptoStream(this)); |
| 386 Initialize(); | 386 Initialize(); |
| 387 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 387 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
| 388 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 388 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 389 } | 389 } |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 // strike register worries that we've just overflowed a uint32_t time. | 892 // strike register worries that we've just overflowed a uint32_t time. |
| 893 (*server_connection)->AdvanceTime(connection_start_time); | 893 (*server_connection)->AdvanceTime(connection_start_time); |
| 894 } | 894 } |
| 895 | 895 |
| 896 QuicStreamId QuicClientDataStreamId(int i) { | 896 QuicStreamId QuicClientDataStreamId(int i) { |
| 897 return kClientDataStreamId1 + 2 * i; | 897 return kClientDataStreamId1 + 2 * i; |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace test | 900 } // namespace test |
| 901 } // namespace net | 901 } // namespace net |
| OLD | NEW |