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

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

Issue 6833031: Changed the jingle network code in ChromeAsyncSocket to use the client socket pool. This also all... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 9 years, 8 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/notifier/base/xmpp_client_socket_factory.h ('k') | jingle/notifier/base/xmpp_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/xmpp_client_socket_factory.cc
===================================================================
--- jingle/notifier/base/xmpp_client_socket_factory.cc (revision 81699)
+++ jingle/notifier/base/xmpp_client_socket_factory.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,13 +6,21 @@
#include "base/logging.h"
#include "jingle/notifier/base/fake_ssl_client_socket.h"
+#include "jingle/notifier/base/proxy_resolving_client_socket.h"
+#include "net/socket/client_socket_factory.h"
+#include "net/url_request/url_request_context.h"
+#include "net/url_request/url_request_context_getter.h"
namespace notifier {
XmppClientSocketFactory::XmppClientSocketFactory(
net::ClientSocketFactory* client_socket_factory,
+ const net::SSLConfig& ssl_config,
+ const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
bool use_fake_ssl_client_socket)
: client_socket_factory_(client_socket_factory),
+ request_context_getter_(request_context_getter),
+ ssl_config_(ssl_config),
use_fake_ssl_client_socket_(use_fake_ssl_client_socket) {
CHECK(client_socket_factory_);
}
@@ -20,30 +28,23 @@
XmppClientSocketFactory::~XmppClientSocketFactory() {}
net::ClientSocket* XmppClientSocketFactory::CreateTransportClientSocket(
- const net::AddressList& addresses,
- net::NetLog* net_log,
- const net::NetLog::Source& source) {
- net::ClientSocket* transport_socket =
- client_socket_factory_->CreateTransportClientSocket(
- addresses, net_log, source);
+ const net::HostPortPair& host_and_port, net::NetLog* net_log) {
+ net::ClientSocket* transport_socket = new ProxyResolvingClientSocket(
+ request_context_getter_,
+ ssl_config_,
+ host_and_port,
+ net_log);
return (use_fake_ssl_client_socket_ ?
new FakeSSLClientSocket(transport_socket) : transport_socket);
}
net::SSLClientSocket* XmppClientSocketFactory::CreateSSLClientSocket(
net::ClientSocketHandle* transport_socket,
- const net::HostPortPair& host_and_port,
- const net::SSLConfig& ssl_config,
- net::SSLHostInfo* ssl_host_info,
- net::CertVerifier* cert_verifier,
- net::DnsCertProvenanceChecker* dns_cert_checker) {
+ const net::HostPortPair& host_and_port) {
return client_socket_factory_->CreateSSLClientSocket(
- transport_socket, host_and_port, ssl_config, ssl_host_info,
- cert_verifier, dns_cert_checker);
+ transport_socket, host_and_port, ssl_config_, NULL,
+ request_context_getter_->GetURLRequestContext()->cert_verifier(), NULL);
}
-void XmppClientSocketFactory::ClearSSLSessionCache() {
- client_socket_factory_->ClearSSLSessionCache();
-}
} // namespace
« no previous file with comments | « jingle/notifier/base/xmpp_client_socket_factory.h ('k') | jingle/notifier/base/xmpp_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698