From fe89ea7e351d304ca379125329018f5b96a2aded Mon Sep 17 00:00:00 2001 From: "eroman@chromium.org" Date: Thu, 12 May 2011 02:02:40 +0000 Subject: Miscelaneous cleanups to AddressList to make it harder to mis-use. - Removed all destructive non-const member functions -- these were dangerous since if you called them without first making a copy of the AddressList, it could mutate earlier copies. - Made AddressList::Data::head const, so new code added to AddressList cannot inadvertently introduce such dangerous mutations (won't compile). - Moved the non-trivial constructors and assign methods into factory methods (for added readability) - Removed the bool parameter from Copy (for added readability). Review URL: http://codereview.chromium.org/6880302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85090 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/transport_client_socket_pool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/socket/transport_client_socket_pool.cc') diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc index c35a934..76ade36 100644 --- a/net/socket/transport_client_socket_pool.cc +++ b/net/socket/transport_client_socket_pool.cc @@ -119,7 +119,7 @@ void TransportConnectJob::MakeAddrListStartWithIPv4(AddressList* addrlist) { } head->ai_canonname = canonname; - addrlist->Copy(head, true); + *addrlist = AddressList::CreateByCopying(head); FreeCopyOfAddrinfo(head); } -- cgit v1.1