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" |
12 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
13 #include "net/socket/client_socket_factory.h" | 14 #include "net/socket/client_socket_factory.h" |
14 #include "net/socket/ssl_client_socket.h" | 15 #include "net/socket/ssl_client_socket.h" |
15 #include "net/socket/stream_socket.h" | 16 #include "net/socket/stream_socket.h" |
16 #include "net/udp/datagram_client_socket.h" | 17 #include "net/udp/datagram_client_socket.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 namespace { | 21 namespace { |
21 | 22 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( | 103 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( |
103 DatagramSocket::BindType, | 104 DatagramSocket::BindType, |
104 const RandIntCallback&, | 105 const RandIntCallback&, |
105 NetLog*, | 106 NetLog*, |
106 const NetLog::Source&) override { | 107 const NetLog::Source&) override { |
107 return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_)); | 108 return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_)); |
108 } | 109 } |
109 scoped_ptr<StreamSocket> CreateTransportClientSocket( | 110 scoped_ptr<StreamSocket> CreateTransportClientSocket( |
110 const AddressList&, | 111 const AddressList&, |
| 112 scoped_ptr<SocketPerformanceWatcher>, |
111 NetLog*, | 113 NetLog*, |
112 const NetLog::Source&) override { | 114 const NetLog::Source&) override { |
113 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
114 return scoped_ptr<StreamSocket>(); | 116 return scoped_ptr<StreamSocket>(); |
115 } | 117 } |
116 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( | 118 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( |
117 scoped_ptr<ClientSocketHandle>, | 119 scoped_ptr<ClientSocketHandle>, |
118 const HostPortPair&, | 120 const HostPortPair&, |
119 const SSLConfig&, | 121 const SSLConfig&, |
120 const SSLClientSocketContext&) override { | 122 const SSLClientSocketContext&) override { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 AddMapping("4000::1", "4000::10"); // global unicast | 325 AddMapping("4000::1", "4000::10"); // global unicast |
324 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast | 326 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast |
325 GetSourceInfo("fe81::20")->deprecated = true; | 327 GetSourceInfo("fe81::20")->deprecated = true; |
326 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", | 328 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", |
327 "::1", "8.0.0.1", NULL }; | 329 "::1", "8.0.0.1", NULL }; |
328 const int order[] = { 4, 3, 0, 2, 1, -1 }; | 330 const int order[] = { 4, 3, 0, 2, 1, -1 }; |
329 Verify(addresses, order); | 331 Verify(addresses, order); |
330 } | 332 } |
331 | 333 |
332 } // namespace net | 334 } // namespace net |
OLD | NEW |