OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/dns/address_sorter_posix.h" | 5 #include "net/dns/address_sorter_posix.h" |
6 | 6 |
7 #include <netinet/in.h> | 7 #include <netinet/in.h> |
8 | 8 |
9 #if defined(OS_MACOSX) || defined(OS_BSD) | 9 #if defined(OS_MACOSX) || defined(OS_BSD) |
10 #include <sys/socket.h> // Must be included before ifaddrs.h. | 10 #include <sys/socket.h> // Must be included before ifaddrs.h. |
11 #include <ifaddrs.h> | 11 #include <ifaddrs.h> |
12 #include <net/if.h> | 12 #include <net/if.h> |
13 #include <netinet/in_var.h> | 13 #include <netinet/in_var.h> |
14 #include <string.h> | 14 #include <string.h> |
15 #include <sys/ioctl.h> | 15 #include <sys/ioctl.h> |
16 #endif | 16 #endif |
17 | 17 |
18 #include <algorithm> | 18 #include <algorithm> |
19 | 19 |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/memory/scoped_vector.h" | 21 #include "base/memory/scoped_vector.h" |
22 #include "base/posix/eintr_wrapper.h" | |
23 #include "net/socket/client_socket_factory.h" | 22 #include "net/socket/client_socket_factory.h" |
24 #include "net/udp/datagram_client_socket.h" | 23 #include "net/udp/datagram_client_socket.h" |
25 | 24 |
26 #if defined(OS_LINUX) | 25 #if defined(OS_LINUX) |
27 #include "net/base/address_tracker_linux.h" | 26 #include "net/base/address_tracker_linux.h" |
28 #endif | 27 #endif |
29 | 28 |
30 namespace net { | 29 namespace net { |
31 | 30 |
32 namespace { | 31 namespace { |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 } | 392 } |
394 | 393 |
395 // static | 394 // static |
396 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { | 395 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { |
397 return scoped_ptr<AddressSorter>( | 396 return scoped_ptr<AddressSorter>( |
398 new AddressSorterPosix(ClientSocketFactory::GetDefaultFactory())); | 397 new AddressSorterPosix(ClientSocketFactory::GetDefaultFactory())); |
399 } | 398 } |
400 | 399 |
401 } // namespace net | 400 } // namespace net |
402 | 401 |
OLD | NEW |