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

Unified Diff: net/socket/socks5_client_socket_unittest.cc

Issue 22794008: Remove deprecated functions that take StreamSockets instead of handles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android for reals Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 717d858eef840730e4847dbea30429bcd99edd06..630884fc153d378c96026a1a3d12c8c1c6611088 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -47,6 +47,8 @@ class SOCKS5ClientSocketTest : public PlatformTest {
CapturingNetLog net_log_;
scoped_ptr<SOCKS5ClientSocket> user_sock_;
AddressList address_list_;
+ // Filled in by BuildMockSocket() and owned by its return value
+ // (which |user_sock| is set to).
StreamSocket* tcp_sock_;
TestCompletionCallback callback_;
scoped_ptr<MockHostResolver> host_resolver_;
@@ -94,7 +96,12 @@ SOCKS5ClientSocket* SOCKS5ClientSocketTest::BuildMockSocket(
EXPECT_EQ(OK, rv);
EXPECT_TRUE(tcp_sock_->IsConnected());
- return new SOCKS5ClientSocket(tcp_sock_,
+ scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
+ // |connection| takes ownership of |tcp_sock_|, but keep a
+ // non-owning pointer to it.
+ connection->set_socket(tcp_sock_);
+ return new SOCKS5ClientSocket(
+ connection.release(),
HostResolver::RequestInfo(HostPortPair(hostname, port)));
}
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698