OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifdef OS_WIN | 7 #ifdef OS_WIN |
8 #include <ws2tcpip.h> | 8 #include <ws2tcpip.h> |
9 #include <wspiapi.h> // Needed for Win2k compat. | 9 #include <wspiapi.h> // Needed for Win2k compat. |
10 #else | 10 #else |
11 #include <netdb.h> | 11 #include <netdb.h> |
12 #endif | 12 #endif |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 void AddressList::Adopt(struct addrinfo* head) { | 16 void AddressList::Adopt(struct addrinfo* head) { |
17 data_ = new Data(head); | 17 data_ = new Data(head); |
18 } | 18 } |
19 | 19 |
20 AddressList::Data::~Data() { | 20 AddressList::Data::~Data() { |
21 freeaddrinfo(head); | 21 freeaddrinfo(head); |
22 } | 22 } |
23 | 23 |
24 } // namespace net | 24 } // namespace net |
25 | |
OLD | NEW |