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

Unified Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 2116983002: Change HostResolver::Resolve() to take an std::unique_ptr<Request>* rather than a RequestHandle* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http_stream_factory_impl_job_controller_unittest RequestHandle* to unique_ptr Created 4 years, 5 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
Index: net/socket/ssl_client_socket_pool_unittest.cc
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 824c62278412c05e62b753811030bc4e2dd47d61..0bc6a9bc22c6b73cd93d211e8a01c664b6b93db7 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -820,6 +820,7 @@ TEST_F(SSLClientSocketPoolTest, IPPooling) {
};
host_resolver_.set_synchronous_mode(true);
+ std::unique_ptr<HostResolver::Request> req[arraysize(test_hosts)];
for (size_t i = 0; i < arraysize(test_hosts); i++) {
host_resolver_.rules()->AddIPLiteralRule(
test_hosts[i].name, test_hosts[i].iplist, std::string());
@@ -827,12 +828,8 @@ TEST_F(SSLClientSocketPoolTest, IPPooling) {
// This test requires that the HostResolver cache be populated. Normal
// code would have done this already, but we do it manually.
HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
- host_resolver_.Resolve(info,
- DEFAULT_PRIORITY,
- &test_hosts[i].addresses,
- CompletionCallback(),
- NULL,
- BoundNetLog());
+ host_resolver_.Resolve(info, DEFAULT_PRIORITY, &test_hosts[i].addresses,
+ CompletionCallback(), &req[i], BoundNetLog());
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
@@ -880,6 +877,7 @@ void SSLClientSocketPoolTest::TestIPPoolingDisabled(
TestCompletionCallback callback;
int rv;
+ std::unique_ptr<HostResolver::Request> req[arraysize(test_hosts)];
for (size_t i = 0; i < arraysize(test_hosts); i++) {
host_resolver_.rules()->AddIPLiteralRule(
test_hosts[i].name, test_hosts[i].iplist, std::string());
@@ -887,12 +885,9 @@ void SSLClientSocketPoolTest::TestIPPoolingDisabled(
// This test requires that the HostResolver cache be populated. Normal
// code would have done this already, but we do it manually.
HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
- rv = host_resolver_.Resolve(info,
- DEFAULT_PRIORITY,
- &test_hosts[i].addresses,
- callback.callback(),
- NULL,
- BoundNetLog());
+ rv =
+ host_resolver_.Resolve(info, DEFAULT_PRIORITY, &test_hosts[i].addresses,
+ callback.callback(), &req[i], BoundNetLog());
EXPECT_THAT(callback.GetResult(rv), IsOk());
// Setup a SpdySessionKey

Powered by Google App Engine
This is Rietveld 408576698