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.h" | 5 #include "net/dns/address_sorter.h" |
6 | 6 |
7 #include <winsock2.h> | 7 #include <winsock2.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
14 #include "base/threading/worker_pool.h" | 15 #include "base/threading/worker_pool.h" |
15 #include "base/win/windows_version.h" | 16 #include "base/win/windows_version.h" |
16 #include "net/base/address_list.h" | 17 #include "net/base/address_list.h" |
17 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
18 #include "net/base/winsock_init.h" | 19 #include "net/base/winsock_init.h" |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 193 |
193 // static | 194 // static |
194 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { | 195 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { |
195 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 196 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
196 return scoped_ptr<AddressSorter>(new AddressSorterWinXP()); | 197 return scoped_ptr<AddressSorter>(new AddressSorterWinXP()); |
197 return scoped_ptr<AddressSorter>(new AddressSorterWin()); | 198 return scoped_ptr<AddressSorter>(new AddressSorterWin()); |
198 } | 199 } |
199 | 200 |
200 } // namespace net | 201 } // namespace net |
201 | 202 |
OLD | NEW |