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

Side by Side Diff: net/quic/test_tools/quic_test_utils.cc

Issue 2580393003: Replace QuicAckListenerInterface* with scoped_refptr<QuicAckListenerInterface>. (Closed)
Patch Set: Created 4 years 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/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.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 (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
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
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
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698