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/macros.h" |
| 15 #include "base/memory/free_deleter.h" |
15 #include "base/threading/worker_pool.h" | 16 #include "base/threading/worker_pool.h" |
16 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
17 #include "net/base/address_list.h" | 18 #include "net/base/address_list.h" |
18 #include "net/base/ip_endpoint.h" | 19 #include "net/base/ip_endpoint.h" |
19 #include "net/base/winsock_init.h" | 20 #include "net/base/winsock_init.h" |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 194 |
194 // static | 195 // static |
195 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { | 196 scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() { |
196 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 197 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
197 return scoped_ptr<AddressSorter>(new AddressSorterWinXP()); | 198 return scoped_ptr<AddressSorter>(new AddressSorterWinXP()); |
198 return scoped_ptr<AddressSorter>(new AddressSorterWin()); | 199 return scoped_ptr<AddressSorter>(new AddressSorterWin()); |
199 } | 200 } |
200 | 201 |
201 } // namespace net | 202 } // namespace net |
202 | 203 |
OLD | NEW |