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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 378013002: Provide "hostname:port" to the P2P Browser process sockets via P2PHostMsg_CreateSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 596a60d8eb36525e529c12a3946d377acd3b9052..ce99a1ff04f596e8b616c1463c8458fd1ac414e6 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -83,14 +83,16 @@ bool P2PSocketHostTcpBase::Init(const net::IPEndPoint& local_address,
remote_address_ = remote_address;
state_ = STATE_CONNECTING;
- net::HostPortPair dest_host_port_pair =
- net::HostPortPair::FromIPEndPoint(remote_address.ip_address);
+ net::HostPortPair dest_host_port_pair;
// If there is no resolved address, let's try with domain name, assuming
// socket layer will do the DNS resolve.
if (remote_address.ip_address.address().empty()) {
DCHECK(!remote_address.hostname.empty());
- dest_host_port_pair = net::HostPortPair(
- remote_address.hostname, remote_address.ip_address.port());
+ dest_host_port_pair = net::HostPortPair::FromString(
+ remote_address.hostname);
+ } else {
+ dest_host_port_pair = net::HostPortPair::FromIPEndPoint(
+ remote_address.ip_address);
}
// TODO(mallinath) - We are ignoring local_address altogether. We should
« no previous file with comments | « no previous file | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698