diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 04:16:54 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 04:16:54 +0000 |
commit | b2295b0cec258dba9b265e43b29b6c7cc5a973c8 (patch) | |
tree | 2422ef1a8422d997db311d76f86c73c615f06f11 /chrome | |
parent | 32b7c4995d5f5ecc034999c02c28ded2190c6888 (diff) | |
download | chromium_src-b2295b0cec258dba9b265e43b29b6c7cc5a973c8.zip chromium_src-b2295b0cec258dba9b265e43b29b6c7cc5a973c8.tar.gz chromium_src-b2295b0cec258dba9b265e43b29b6c7cc5a973c8.tar.bz2 |
Added XmppClientSocketFactory for use with ChromeAsyncSocket
XmppClientSocketFactory serves up regular TCP sockets or fake SSL TCP
sockets. This way, ChromeAsyncSocket has feature parity with
XmppSocketAdapter.
BUG=45612
TEST=existing unittests
Review URL: http://codereview.chromium.org/3299001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/tools/sync_listen_notifications.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc index 69431e1..bc414c2 100644 --- a/chrome/browser/sync/tools/sync_listen_notifications.cc +++ b/chrome/browser/sync/tools/sync_listen_notifications.cc @@ -20,6 +20,7 @@ #include "chrome/common/chrome_switches.h" #include "jingle/notifier/base/chrome_async_socket.h" #include "jingle/notifier/base/task_pump.h" +#include "jingle/notifier/base/xmpp_client_socket_factory.h" #include "jingle/notifier/communicator/xmpp_socket_adapter.h" #include "jingle/notifier/listener/listen_task.h" #include "jingle/notifier/listener/notification_constants.h" @@ -97,11 +98,15 @@ class XmppNotificationClient : public sigslot::has_slots<> { this, &XmppNotificationClient::OnXmppClientStateChange); net::SSLConfig ssl_config; + bool use_fake_ssl_client_socket = + (xmpp_client_settings.protocol() == cricket::PROTO_SSLTCP); buzz::AsyncSocket* buzz_async_socket = use_chrome_async_socket ? static_cast<buzz::AsyncSocket*>( new notifier::ChromeAsyncSocket( - net::ClientSocketFactory::GetDefaultFactory(), + new notifier::XmppClientSocketFactory( + net::ClientSocketFactory::GetDefaultFactory(), + use_fake_ssl_client_socket), ssl_config, 4096, 64 * 1024, NULL)) : static_cast<buzz::AsyncSocket*>( new notifier::XmppSocketAdapter(xmpp_client_settings_, false)); |