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

Side by Side Diff: net/base/address_list.cc

Issue 7466031: AsyncHostResolver: integrated HostCache, temporarily, until we have RR cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698