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

Unified Diff: net/socket/socks_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/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_openssl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket_unittest.cc
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 7a8faf6985662c6ada85f37a18e157ee4406ab92..640c4f1eb315d76777acae51b97db805144ba98a 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -37,6 +37,8 @@ class SOCKSClientSocketTest : public PlatformTest {
protected:
scoped_ptr<SOCKSClientSocket> 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_;
@@ -73,7 +75,12 @@ SOCKSClientSocket* SOCKSClientSocketTest::BuildMockSocket(
EXPECT_EQ(OK, rv);
EXPECT_TRUE(tcp_sock_->IsConnected());
- return new SOCKSClientSocket(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 SOCKSClientSocket(
+ connection.release(),
HostResolver::RequestInfo(HostPortPair(hostname, port)),
host_resolver);
}
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_openssl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698