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

Unified Diff: net/socket/socks5_client_socket_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: changed implementation of attach/detach of request 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/socks5_client_socket_unittest.cc
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index 97bfeca1f9f0edd17499df1b90dddc9ba13776ce..91507e4465e3357683399ede3d1d62cdbbfda378 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -65,6 +65,7 @@ class SOCKS5ClientSocketTest : public PlatformTest {
std::unique_ptr<SocketDataProvider> data_;
private:
+ std::unique_ptr<HostResolver::Request> request_;
mmenke 2016/07/19 19:03:56 This doesn't need to be a member of the class - ca
maksims (do not use this acc) 2016/07/21 07:12:46 Done.
DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocketTest);
};
@@ -80,12 +81,9 @@ void SOCKS5ClientSocketTest::SetUp() {
// Resolve the "localhost" AddressList used by the TCP connection to connect.
HostResolver::RequestInfo info(HostPortPair("www.socks-proxy.com", 1080));
TestCompletionCallback callback;
- int rv = host_resolver_->Resolve(info,
- DEFAULT_PRIORITY,
- &address_list_,
- callback.callback(),
- NULL,
- BoundNetLog());
+ int rv =
+ host_resolver_->Resolve(info, DEFAULT_PRIORITY, &address_list_,
+ callback.callback(), &request_, BoundNetLog());
ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
ASSERT_THAT(rv, IsOk());

Powered by Google App Engine
This is Rietveld 408576698