Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: net/base/ip_endpoint.cc

Issue 1534583002: Migrate Local Discovery from net::IPAddressNumber to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/base/ip_endpoint.h ('K') | « net/base/ip_endpoint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ip_endpoint.cc
diff --git a/net/base/ip_endpoint.cc b/net/base/ip_endpoint.cc
index f7f7b1822336c7408ef40a2d53ee5f30c4902e9b..6fe710a626ebf4e7929e6e8b7e6e04eda29cbf57 100644
--- a/net/base/ip_endpoint.cc
+++ b/net/base/ip_endpoint.cc
@@ -14,6 +14,7 @@
#elif defined(OS_POSIX)
#include <netinet/in.h>
#endif
+#include "net/base/ip_address.h"
#include "net/base/net_util.h"
namespace net {
@@ -32,6 +33,9 @@ IPEndPoint::IPEndPoint(const IPAddressNumber& address, uint16_t port)
: address_(address), port_(port) {
}
+IPEndPoint::IPEndPoint(const IPAddress& address, uint16_t port)
+ : address_(address.bytes()), port_(port) {}
+
IPEndPoint::IPEndPoint(const IPEndPoint& endpoint) {
address_ = endpoint.address_;
port_ = endpoint.port_;
« net/base/ip_endpoint.h ('K') | « net/base/ip_endpoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698