summaryrefslogtreecommitdiffstats
path: root/remoting/jingle_glue
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 19:20:18 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 19:20:18 +0000
commit72a5b010a2394f092399d7d2bc566f1c2c0012a1 (patch)
tree2cf5a0560eaaeec24d1080d19b2bc481e713ac12 /remoting/jingle_glue
parent1fa199f54390bff243a334a48384208bf4f03081 (diff)
downloadchromium_src-72a5b010a2394f092399d7d2bc566f1c2c0012a1.zip
chromium_src-72a5b010a2394f092399d7d2bc566f1c2c0012a1.tar.gz
chromium_src-72a5b010a2394f092399d7d2bc566f1c2c0012a1.tar.bz2
Revert 219719 "Make XmppSignalStrategy accept ResolvingClientSoc..."
It caused crbug.com/293068 . > Make XmppSignalStrategy accept ResolvingClientSocketFactory from outside. > > This is necessary to allow passing Pepper-based > ResolvingClientSocketFactory when using XMPP in the client plugin. > > BUG=274652 > > Review URL: https://chromiumcodereview.appspot.com/23443004 TBR=jamiewalch@chromium.org Review URL: https://codereview.chromium.org/23792010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue')
-rw-r--r--remoting/jingle_glue/xmpp_signal_strategy.cc14
-rw-r--r--remoting/jingle_glue/xmpp_signal_strategy.h13
2 files changed, 18 insertions, 9 deletions
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.cc b/remoting/jingle_glue/xmpp_signal_strategy.cc
index a9da0de..ed27833 100644
--- a/remoting/jingle_glue/xmpp_signal_strategy.cc
+++ b/remoting/jingle_glue/xmpp_signal_strategy.cc
@@ -11,11 +11,12 @@
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
#include "jingle/glue/chrome_async_socket.h"
-#include "jingle/glue/resolving_client_socket_factory.h"
#include "jingle/glue/task_pump.h"
+#include "jingle/glue/xmpp_client_socket_factory.h"
#include "jingle/notifier/base/gaia_constants.h"
#include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h"
#include "net/socket/client_socket_factory.h"
+#include "net/url_request/url_request_context_getter.h"
#include "third_party/libjingle/source/talk/base/thread.h"
#include "third_party/libjingle/source/talk/xmpp/prexmppauth.h"
#include "third_party/libjingle/source/talk/xmpp/saslcookiemechanism.h"
@@ -37,9 +38,11 @@ XmppSignalStrategy::XmppServerConfig::XmppServerConfig() {}
XmppSignalStrategy::XmppServerConfig::~XmppServerConfig() {}
XmppSignalStrategy::XmppSignalStrategy(
- scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory,
+ net::ClientSocketFactory* socket_factory,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
const XmppSignalStrategy::XmppServerConfig& xmpp_server_config)
- : socket_factory_(socket_factory.Pass()),
+ : socket_factory_(socket_factory),
+ request_context_getter_(request_context_getter),
resource_name_(kDefaultResourceName),
xmpp_client_(NULL),
xmpp_server_config_(xmpp_server_config),
@@ -79,8 +82,11 @@ void XmppSignalStrategy::Connect() {
settings.set_use_tls(
xmpp_server_config_.use_tls ? buzz::TLS_ENABLED : buzz::TLS_DISABLED);
+ scoped_ptr<jingle_glue::XmppClientSocketFactory> xmpp_socket_factory(
+ new jingle_glue::XmppClientSocketFactory(
+ socket_factory_, net::SSLConfig(), request_context_getter_, false));
buzz::AsyncSocket* socket = new jingle_glue::ChromeAsyncSocket(
- socket_factory_.release(), kReadBufferSize, kWriteBufferSize);
+ xmpp_socket_factory.release(), kReadBufferSize, kWriteBufferSize);
task_runner_.reset(new jingle_glue::TaskPump());
xmpp_client_ = new buzz::XmppClient(task_runner_.get());
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.h b/remoting/jingle_glue/xmpp_signal_strategy.h
index ecb13cc..4ef6b70 100644
--- a/remoting/jingle_glue/xmpp_signal_strategy.h
+++ b/remoting/jingle_glue/xmpp_signal_strategy.h
@@ -21,9 +21,10 @@
#include "third_party/libjingle/source/talk/base/sigslot.h"
#include "third_party/libjingle/source/talk/xmpp/xmppclient.h"
-namespace jingle_glue {
-class ResolvingClientSocketFactory;
-} // namespace jingle_glue
+namespace net {
+class ClientSocketFactory;
+class URLRequestContextGetter;
+} // namespace net
namespace talk_base {
class TaskRunner;
@@ -53,7 +54,8 @@ class XmppSignalStrategy : public base::NonThreadSafe,
};
XmppSignalStrategy(
- scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory,
+ net::ClientSocketFactory* socket_factory,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
const XmppServerConfig& xmpp_server_config);
virtual ~XmppSignalStrategy();
@@ -91,7 +93,8 @@ class XmppSignalStrategy : public base::NonThreadSafe,
void SendKeepAlive();
- scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory_;
+ net::ClientSocketFactory* socket_factory_;
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
std::string resource_name_;
scoped_ptr<talk_base::TaskRunner> task_runner_;
buzz::XmppClient* xmpp_client_;