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" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int GetPeerAddress(IPEndPoint* address) const override { | 52 int GetPeerAddress(IPEndPoint* address) const override { |
53 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
54 return OK; | 54 return OK; |
55 } | 55 } |
56 int GetLocalAddress(IPEndPoint* address) const override { | 56 int GetLocalAddress(IPEndPoint* address) const override { |
57 if (!connected_) | 57 if (!connected_) |
58 return ERR_UNEXPECTED; | 58 return ERR_UNEXPECTED; |
59 *address = local_endpoint_; | 59 *address = local_endpoint_; |
60 return OK; | 60 return OK; |
61 } | 61 } |
| 62 void UseNonBlockingIO() override {} |
62 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, | 63 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, |
63 const IPEndPoint& address) override { | 64 const IPEndPoint& address) override { |
64 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
65 return ERR_NOT_IMPLEMENTED; | 66 return ERR_NOT_IMPLEMENTED; |
66 } | 67 } |
67 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override { | 68 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override { |
68 NOTIMPLEMENTED(); | 69 NOTIMPLEMENTED(); |
69 return ERR_NOT_IMPLEMENTED; | 70 return ERR_NOT_IMPLEMENTED; |
70 } | 71 } |
71 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override { | 72 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override { |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 AddMapping("4000::1", "4000::10"); // global unicast | 327 AddMapping("4000::1", "4000::10"); // global unicast |
327 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast | 328 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast |
328 GetSourceInfo("fe81::20")->deprecated = true; | 329 GetSourceInfo("fe81::20")->deprecated = true; |
329 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", | 330 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", |
330 "::1", "8.0.0.1", NULL }; | 331 "::1", "8.0.0.1", NULL }; |
331 const int order[] = { 4, 3, 0, 2, 1, -1 }; | 332 const int order[] = { 4, 3, 0, 2, 1, -1 }; |
332 Verify(addresses, order); | 333 Verify(addresses, order); |
333 } | 334 } |
334 | 335 |
335 } // namespace net | 336 } // namespace net |
OLD | NEW |