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 "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
11 #include "net/base/test_completion_callback.h" | 12 #include "net/base/test_completion_callback.h" |
12 #include "net/socket/client_socket_factory.h" | 13 #include "net/socket/client_socket_factory.h" |
13 #include "net/socket/ssl_client_socket.h" | 14 #include "net/socket/ssl_client_socket.h" |
14 #include "net/socket/stream_socket.h" | 15 #include "net/socket/stream_socket.h" |
15 #include "net/udp/datagram_client_socket.h" | 16 #include "net/udp/datagram_client_socket.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
(...skipping 17 matching lines...) Expand all Loading... |
36 ~TestUDPClientSocket() override {} | 37 ~TestUDPClientSocket() override {} |
37 | 38 |
38 int Read(IOBuffer*, int, const CompletionCallback&) override { | 39 int Read(IOBuffer*, int, const CompletionCallback&) override { |
39 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
40 return OK; | 41 return OK; |
41 } | 42 } |
42 int Write(IOBuffer*, int, const CompletionCallback&) override { | 43 int Write(IOBuffer*, int, const CompletionCallback&) override { |
43 NOTIMPLEMENTED(); | 44 NOTIMPLEMENTED(); |
44 return OK; | 45 return OK; |
45 } | 46 } |
46 int SetReceiveBufferSize(int32) override { return OK; } | 47 int SetReceiveBufferSize(int32_t) override { return OK; } |
47 int SetSendBufferSize(int32) override { return OK; } | 48 int SetSendBufferSize(int32_t) override { return OK; } |
48 | 49 |
49 void Close() override {} | 50 void Close() override {} |
50 int GetPeerAddress(IPEndPoint* address) const override { | 51 int GetPeerAddress(IPEndPoint* address) const override { |
51 NOTIMPLEMENTED(); | 52 NOTIMPLEMENTED(); |
52 return OK; | 53 return OK; |
53 } | 54 } |
54 int GetLocalAddress(IPEndPoint* address) const override { | 55 int GetLocalAddress(IPEndPoint* address) const override { |
55 if (!connected_) | 56 if (!connected_) |
56 return ERR_UNEXPECTED; | 57 return ERR_UNEXPECTED; |
57 *address = local_endpoint_; | 58 *address = local_endpoint_; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 AddMapping("4000::1", "4000::10"); // global unicast | 322 AddMapping("4000::1", "4000::10"); // global unicast |
322 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast | 323 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast |
323 GetSourceInfo("fe81::20")->deprecated = true; | 324 GetSourceInfo("fe81::20")->deprecated = true; |
324 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", | 325 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", |
325 "::1", "8.0.0.1", NULL }; | 326 "::1", "8.0.0.1", NULL }; |
326 const int order[] = { 4, 3, 0, 2, 1, -1 }; | 327 const int order[] = { 4, 3, 0, 2, 1, -1 }; |
327 Verify(addresses, order); | 328 Verify(addresses, order); |
328 } | 329 } |
329 | 330 |
330 } // namespace net | 331 } // namespace net |
OLD | NEW |