| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ | 5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ |
| 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ | 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/ip_address.h" | 10 #include "net/base/ip_address.h" |
| 11 #include "net/quic/platform/api/quic_export.h" |
| 11 #include "net/quic/platform/api/quic_ip_address_family.h" | 12 #include "net/quic/platform/api/quic_ip_address_family.h" |
| 12 | 13 |
| 13 namespace net { | 14 namespace net { |
| 14 | 15 |
| 15 class NET_EXPORT_PRIVATE QuicIpAddressImpl { | 16 class QUIC_EXPORT_PRIVATE QuicIpAddressImpl { |
| 16 public: | 17 public: |
| 17 static QuicIpAddressImpl Loopback4(); | 18 static QuicIpAddressImpl Loopback4(); |
| 18 static QuicIpAddressImpl Loopback6(); | 19 static QuicIpAddressImpl Loopback6(); |
| 19 static QuicIpAddressImpl Any4(); | 20 static QuicIpAddressImpl Any4(); |
| 20 static QuicIpAddressImpl Any6(); | 21 static QuicIpAddressImpl Any6(); |
| 21 | 22 |
| 22 QuicIpAddressImpl() = default; | 23 QuicIpAddressImpl() = default; |
| 23 QuicIpAddressImpl(const QuicIpAddressImpl& other) = default; | 24 QuicIpAddressImpl(const QuicIpAddressImpl& other) = default; |
| 24 explicit QuicIpAddressImpl(const IPAddress& addr); | 25 explicit QuicIpAddressImpl(const IPAddress& addr); |
| 25 QuicIpAddressImpl& operator=(const QuicIpAddressImpl& other) = default; | 26 QuicIpAddressImpl& operator=(const QuicIpAddressImpl& other) = default; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 bool InSameSubnet(const QuicIpAddressImpl& other, int subnet_length); | 43 bool InSameSubnet(const QuicIpAddressImpl& other, int subnet_length); |
| 43 const IPAddress& ip_address() const { return ip_address_; } | 44 const IPAddress& ip_address() const { return ip_address_; } |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 IPAddress ip_address_; | 47 IPAddress ip_address_; |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace net | 50 } // namespace net |
| 50 | 51 |
| 51 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ | 52 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_ |
| OLD | NEW |