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

Unified Diff: net/socket/socks_client_socket.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback eroman Created 4 years, 11 months 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
Index: net/socket/socks_client_socket.cc
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index 69805bb6f3a9cbcc778aa7b3443a6b3bbaed7a22..ca64231bbcb5bb757af321cac932b06c174317db 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -334,8 +334,9 @@ const std::string SOCKSClientSocket::BuildHandshakeWriteBuffer() const {
// more robust to try all the IP addresses we have before
// failing the connect attempt.
CHECK_EQ(ADDRESS_FAMILY_IPV4, endpoint.GetFamily());
- CHECK_LE(endpoint.address().size(), sizeof(request.ip));
- memcpy(&request.ip, &endpoint.address()[0], endpoint.address().size());
+ CHECK_LE(endpoint.address().bytes().size(), sizeof(request.ip));
+ memcpy(&request.ip, &endpoint.address().bytes()[0],
+ endpoint.address().bytes().size());
DVLOG(1) << "Resolved Host is : " << endpoint.ToStringWithoutPort();

Powered by Google App Engine
This is Rietveld 408576698