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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "net/base/ip_address.h" | 10 #include "net/base/ip_address.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 #include "net/base/socket_performance_watcher.h" | |
13 #include "net/base/test_completion_callback.h" | 12 #include "net/base/test_completion_callback.h" |
14 #include "net/socket/client_socket_factory.h" | 13 #include "net/socket/client_socket_factory.h" |
| 14 #include "net/socket/socket_performance_watcher.h" |
15 #include "net/socket/ssl_client_socket.h" | 15 #include "net/socket/ssl_client_socket.h" |
16 #include "net/socket/stream_socket.h" | 16 #include "net/socket/stream_socket.h" |
17 #include "net/udp/datagram_client_socket.h" | 17 #include "net/udp/datagram_client_socket.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Used to map destination address to source address. | 23 // Used to map destination address to source address. |
24 typedef std::map<IPAddress, IPAddress> AddressMapping; | 24 typedef std::map<IPAddress, IPAddress> AddressMapping; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 AddMapping("4000::1", "4000::10"); // global unicast | 326 AddMapping("4000::1", "4000::10"); // global unicast |
327 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast | 327 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast |
328 GetSourceInfo("fe81::20")->deprecated = true; | 328 GetSourceInfo("fe81::20")->deprecated = true; |
329 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", | 329 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", |
330 "::1", "8.0.0.1", NULL }; | 330 "::1", "8.0.0.1", NULL }; |
331 const int order[] = { 4, 3, 0, 2, 1, -1 }; | 331 const int order[] = { 4, 3, 0, 2, 1, -1 }; |
332 Verify(addresses, order); | 332 Verify(addresses, order); |
333 } | 333 } |
334 | 334 |
335 } // namespace net | 335 } // namespace net |
OLD | NEW |