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

Unified Diff: net/dns/dns_session_unittest.cc

Issue 2389613002: Remove stl_util's deletion functions from net/dns/. (Closed)
Patch Set: fixin Created 4 years, 1 month 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 | « no previous file | net/dns/dns_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_session_unittest.cc
diff --git a/net/dns/dns_session_unittest.cc b/net/dns/dns_session_unittest.cc
index c75e30e98cbf50f16cace6b46d3bd149dd962b90..d228556f4274a23e5f65b9f9b0067182bb4979ab 100644
--- a/net/dns/dns_session_unittest.cc
+++ b/net/dns/dns_session_unittest.cc
@@ -9,8 +9,8 @@
#include <utility>
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
-#include "base/stl_util.h"
#include "net/base/ip_address.h"
#include "net/dns/dns_protocol.h"
#include "net/dns/dns_socket_pool.h"
@@ -56,7 +56,7 @@ class TestClientSocketFactory : public ClientSocketFactory {
void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
private:
- std::list<SocketDataProvider*> data_providers_;
+ std::list<std::unique_ptr<SocketDataProvider>> data_providers_;
};
struct PoolEvent {
@@ -187,14 +187,13 @@ TestClientSocketFactory::CreateDatagramClientSocket(
// We're not actually expecting to send or receive any data, so use the
// simplest SocketDataProvider with no data supplied.
SocketDataProvider* data_provider = new StaticSocketDataProvider();
- data_providers_.push_back(data_provider);
+ data_providers_.push_back(base::WrapUnique(data_provider));
std::unique_ptr<MockUDPClientSocket> socket(
new MockUDPClientSocket(data_provider, net_log));
return std::move(socket);
}
TestClientSocketFactory::~TestClientSocketFactory() {
- base::STLDeleteElements(&data_providers_);
}
TEST_F(DnsSessionTest, AllocateFree) {
« no previous file with comments | « no previous file | net/dns/dns_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698