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

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

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
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/sha1.h" 9 #include "base/sha1.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 MockQuicConnectionHelper* helper, 322 MockQuicConnectionHelper* helper,
323 MockAlarmFactory* alarm_factory, 323 MockAlarmFactory* alarm_factory,
324 Perspective perspective, 324 Perspective perspective,
325 const QuicVersionVector& supported_versions) 325 const QuicVersionVector& supported_versions)
326 : MockQuicConnection(helper, 326 : MockQuicConnection(helper,
327 alarm_factory, 327 alarm_factory,
328 perspective, 328 perspective,
329 supported_versions) {} 329 supported_versions) {}
330 330
331 PacketSavingConnection::~PacketSavingConnection() { 331 PacketSavingConnection::~PacketSavingConnection() {
332 STLDeleteElements(&encrypted_packets_); 332 base::STLDeleteElements(&encrypted_packets_);
333 } 333 }
334 334
335 void PacketSavingConnection::SendOrQueuePacket(SerializedPacket* packet) { 335 void PacketSavingConnection::SendOrQueuePacket(SerializedPacket* packet) {
336 encrypted_packets_.push_back(new QuicEncryptedPacket( 336 encrypted_packets_.push_back(new QuicEncryptedPacket(
337 QuicUtils::CopyBuffer(*packet), packet->encrypted_length, true)); 337 QuicUtils::CopyBuffer(*packet), packet->encrypted_length, true));
338 // Transfer ownership of the packet to the SentPacketManager and the 338 // Transfer ownership of the packet to the SentPacketManager and the
339 // ack notifier to the AckNotifierManager. 339 // ack notifier to the AckNotifierManager.
340 sent_packet_manager_->OnPacketSent(packet, kInvalidPathId, 0, 340 sent_packet_manager_->OnPacketSent(packet, kInvalidPathId, 0,
341 QuicTime::Zero(), NOT_RETRANSMISSION, 341 QuicTime::Zero(), NOT_RETRANSMISSION,
342 HAS_RETRANSMITTABLE_DATA); 342 HAS_RETRANSMITTABLE_DATA);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 // strike register worries that we've just overflowed a uint32_t time. 893 // strike register worries that we've just overflowed a uint32_t time.
894 (*server_connection)->AdvanceTime(connection_start_time); 894 (*server_connection)->AdvanceTime(connection_start_time);
895 } 895 }
896 896
897 QuicStreamId QuicClientDataStreamId(int i) { 897 QuicStreamId QuicClientDataStreamId(int i) {
898 return kClientDataStreamId1 + 2 * i; 898 return kClientDataStreamId1 + 2 * i;
899 } 899 }
900 900
901 } // namespace test 901 } // namespace test
902 } // namespace net 902 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_stream_factory_peer.cc ('k') | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698