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

Unified Diff: jingle/glue/proxy_resolving_client_socket.cc

Issue 1833523002: Migrate content/*/p2p/* code to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments sergeyu Created 4 years, 9 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
« no previous file with comments | « jingle/glue/fake_ssl_client_socket_unittest.cc ('k') | jingle/glue/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/proxy_resolving_client_socket.cc
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc
index 19623197f51e09e74ae6f1b0ce20f328bda2fc23..c546cf97a201acbe170a1fbee6efd7ba2c7bb784 100644
--- a/jingle/glue/proxy_resolving_client_socket.cc
+++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "net/base/io_buffer.h"
+#include "net/base/ip_address.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_auth_controller.h"
@@ -354,13 +355,13 @@ int ProxyResolvingClientSocket::GetPeerAddress(
if (proxy_info_.is_direct())
return transport_->socket()->GetPeerAddress(address);
- net::IPAddressNumber ip_number;
- if (!net::ParseIPLiteralToNumber(dest_host_port_pair_.host(), &ip_number)) {
+ net::IPAddress ip_address;
+ if (!ip_address.AssignFromIPLiteral(dest_host_port_pair_.host())) {
// Do not expose the proxy IP address to the caller.
return net::ERR_NAME_NOT_RESOLVED;
}
- *address = net::IPEndPoint(ip_number, dest_host_port_pair_.port());
+ *address = net::IPEndPoint(ip_address, dest_host_port_pair_.port());
return net::OK;
}
« no previous file with comments | « jingle/glue/fake_ssl_client_socket_unittest.cc ('k') | jingle/glue/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698