| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "net/base/address_list.h" | 5 #include "net/base/address_list.h" | 
| 6 | 6 | 
| 7 #include <stdlib.h> | 7 #include <stdlib.h> | 
| 8 | 8 | 
| 9 #include "base/logging.h" | 9 #include "base/logging.h" | 
| 10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" | 
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 272   struct addrinfo* mutable_head = const_cast<struct addrinfo*>(head); | 272   struct addrinfo* mutable_head = const_cast<struct addrinfo*>(head); | 
| 273 | 273 | 
| 274   // Call either freeaddrinfo(head), or FreeMyAddrinfo(head), depending who | 274   // Call either freeaddrinfo(head), or FreeMyAddrinfo(head), depending who | 
| 275   // created the data. | 275   // created the data. | 
| 276   if (is_system_created) | 276   if (is_system_created) | 
| 277     freeaddrinfo(mutable_head); | 277     freeaddrinfo(mutable_head); | 
| 278   else | 278   else | 
| 279     FreeCopyOfAddrinfo(mutable_head); | 279     FreeCopyOfAddrinfo(mutable_head); | 
| 280 } | 280 } | 
| 281 | 281 | 
|  | 282 AddressList CreateAddressListUsingPort(const AddressList& src, int port) { | 
|  | 283   if (src.GetPort() == port) | 
|  | 284     return src; | 
|  | 285 | 
|  | 286   AddressList out = src; | 
|  | 287   out.SetPort(port); | 
|  | 288   return out; | 
|  | 289 } | 
|  | 290 | 
| 282 }  // namespace net | 291 }  // namespace net | 
| OLD | NEW | 
|---|