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

Side by Side Diff: net/quic/chromium/quic_network_transaction_unittest.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 <memory> 5 #include <memory>
6 #include <ostream> 6 #include <ostream>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 } // namespace 127 } // namespace
128 128
129 // Helper class to encapsulate MockReads and MockWrites for QUIC. 129 // Helper class to encapsulate MockReads and MockWrites for QUIC.
130 // Simplify ownership issues and the interaction with the MockSocketFactory. 130 // Simplify ownership issues and the interaction with the MockSocketFactory.
131 class MockQuicData { 131 class MockQuicData {
132 public: 132 public:
133 MockQuicData() : packet_number_(0) {} 133 MockQuicData() : packet_number_(0) {}
134 134
135 ~MockQuicData() { STLDeleteElements(&packets_); } 135 ~MockQuicData() { base::STLDeleteElements(&packets_); }
136 136
137 void AddSynchronousRead(std::unique_ptr<QuicEncryptedPacket> packet) { 137 void AddSynchronousRead(std::unique_ptr<QuicEncryptedPacket> packet) {
138 reads_.push_back(MockRead(SYNCHRONOUS, packet->data(), packet->length(), 138 reads_.push_back(MockRead(SYNCHRONOUS, packet->data(), packet->length(),
139 packet_number_++)); 139 packet_number_++));
140 packets_.push_back(packet.release()); 140 packets_.push_back(packet.release());
141 } 141 }
142 142
143 void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) { 143 void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) {
144 reads_.push_back( 144 reads_.push_back(
145 MockRead(ASYNC, packet->data(), packet->length(), packet_number_++)); 145 MockRead(ASYNC, packet->data(), packet->length(), packet_number_++));
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 AddHangingSocketData(); 2775 AddHangingSocketData();
2776 2776
2777 SendRequestAndExpectQuicResponse(origin1_); 2777 SendRequestAndExpectQuicResponse(origin1_);
2778 SendRequestAndExpectQuicResponse(origin2_); 2778 SendRequestAndExpectQuicResponse(origin2_);
2779 2779
2780 EXPECT_TRUE(AllDataConsumed()); 2780 EXPECT_TRUE(AllDataConsumed());
2781 } 2781 }
2782 2782
2783 } // namespace test 2783 } // namespace test
2784 } // namespace net 2784 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698