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

Unified Diff: jingle/notifier/base/chrome_async_socket.cc

Issue 3174004: Pass both hostname and port into SSLClientSocket (Closed)
Patch Set: Created 10 years, 4 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 | « chrome/browser/net/preconnect.cc ('k') | jingle/notifier/communicator/ssl_socket_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/chrome_async_socket.cc
diff --git a/jingle/notifier/base/chrome_async_socket.cc b/jingle/notifier/base/chrome_async_socket.cc
index 85929c10735268cc1aa93ef3340123af1ca4dc8f..619786e7180e17a5dd63a0c5bb054b12ae83bdff 100644
--- a/jingle/notifier/base/chrome_async_socket.cc
+++ b/jingle/notifier/base/chrome_async_socket.cc
@@ -17,6 +17,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "net/base/address_list.h"
+#include "net/base/host_port_pair.h"
#include "net/base/io_buffer.h"
#include "net/base/ssl_config_service.h"
#include "net/base/sys_addrinfo.h"
@@ -436,9 +437,14 @@ bool ChromeAsyncSocket::StartTls(const std::string& domain_name) {
scoped_runnable_method_factory_.RevokeAll();
DCHECK(transport_socket_.get());
+ // This is not passed the port explictly, but transport_socket_ is a
+ // TCP socket, so GetPeerAddress will not have proxy issues.
+ net::AddressList address;
+ transport_socket_->GetPeerAddress(&address);
+ net::HostPortPair endpoint(domain_name, address.GetPort());
transport_socket_.reset(
client_socket_factory_->CreateSSLClientSocket(
- transport_socket_.release(), domain_name, ssl_config_));
+ transport_socket_.release(), endpoint, ssl_config_));
int status = transport_socket_->Connect(&ssl_connect_callback_);
if (status != net::ERR_IO_PENDING) {
MessageLoop* message_loop = MessageLoop::current();
« no previous file with comments | « chrome/browser/net/preconnect.cc ('k') | jingle/notifier/communicator/ssl_socket_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698