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

Unified Diff: net/quic/chromium/quic_end_to_end_unittest.cc

Issue 2417183003: Remove stl_util's deletion functions from remaining quic code. (Closed)
Patch Set: rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/chromium/crypto/proof_verifier_chromium.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_end_to_end_unittest.cc
diff --git a/net/quic/chromium/quic_end_to_end_unittest.cc b/net/quic/chromium/quic_end_to_end_unittest.cc
index d4f0a02aef1fd8d3fb073def79ab1323f9f143fe..a7720affc7f40a6059ea613ebba9a4c301e2347a 100644
--- a/net/quic/chromium/quic_end_to_end_unittest.cc
+++ b/net/quic/chromium/quic_end_to_end_unittest.cc
@@ -10,7 +10,6 @@
#include "base/compiler_specific.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
-#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/elements_upload_data_stream.h"
#include "net/base/ip_address.h"
@@ -352,22 +351,19 @@ TEST_P(QuicEndToEndTest, UberTest) {
const char kResponseBody[] = "some really big response body";
AddToCache(request_.url.PathForRequest(), 200, "OK", kResponseBody);
- std::vector<TestTransactionConsumer*> consumers;
- size_t num_requests = 100;
- for (size_t i = 0; i < num_requests; ++i) {
+ std::vector<std::unique_ptr<TestTransactionConsumer>> consumers;
+ for (size_t i = 0; i < 100; ++i) {
TestTransactionConsumer* consumer = new TestTransactionConsumer(
DEFAULT_PRIORITY, transaction_factory_.get());
- consumers.push_back(consumer);
+ consumers.push_back(base::WrapUnique(consumer));
consumer->Start(&request_, NetLogWithSource());
}
// Will terminate when the last consumer completes.
base::RunLoop().Run();
- for (size_t i = 0; i < num_requests; ++i) {
- CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody);
- }
- base::STLDeleteElements(&consumers);
+ for (const auto& consumer : consumers)
+ CheckResponse(*consumer.get(), "HTTP/1.1 200", kResponseBody);
}
} // namespace test
« no previous file with comments | « net/quic/chromium/crypto/proof_verifier_chromium.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698