diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 19:20:18 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 19:20:18 +0000 |
commit | 72a5b010a2394f092399d7d2bc566f1c2c0012a1 (patch) | |
tree | 2cf5a0560eaaeec24d1080d19b2bc481e713ac12 /remoting | |
parent | 1fa199f54390bff243a334a48384208bf4f03081 (diff) | |
download | chromium_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')
-rw-r--r-- | remoting/client/jni/chromoting_jni_instance.cc | 9 | ||||
-rw-r--r-- | remoting/host/DEPS | 3 | ||||
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 9 | ||||
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 8 | ||||
-rw-r--r-- | remoting/jingle_glue/xmpp_signal_strategy.cc | 14 | ||||
-rw-r--r-- | remoting/jingle_glue/xmpp_signal_strategy.h | 13 |
6 files changed, 27 insertions, 29 deletions
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc index 28822f6..84d94d6 100644 --- a/remoting/client/jni/chromoting_jni_instance.cc +++ b/remoting/client/jni/chromoting_jni_instance.cc @@ -6,7 +6,6 @@ #include "base/bind.h" #include "base/logging.h" -#include "jingle/glue/xmpp_client_socket_factory.h" #include "net/socket/client_socket_factory.h" #include "remoting/client/audio_player.h" #include "remoting/client/jni/android_keymap.h" @@ -256,11 +255,9 @@ void ChromotingJniInstance::ConnectToHostOnNetworkThread() { view_->set_frame_producer(client_->GetFrameProducer()); - scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory( - new jingle_glue::XmppClientSocketFactory( - net::ClientSocketFactory::GetDefaultFactory(), net::SSLConfig(), - jni_runtime_->url_requester(), false)); - signaling_.reset(new XmppSignalStrategy(socket_factory.Pass(), xmpp_config_)); + signaling_.reset(new XmppSignalStrategy( + net::ClientSocketFactory::GetDefaultFactory(), + jni_runtime_->url_requester(), xmpp_config_)); network_settings_.reset(new NetworkSettings( NetworkSettings::NAT_TRAVERSAL_ENABLED)); diff --git a/remoting/host/DEPS b/remoting/host/DEPS index 90d75ca..ef945f3 100644 --- a/remoting/host/DEPS +++ b/remoting/host/DEPS @@ -1,9 +1,8 @@ include_rules = [ - "+jingle/glue", "+net", "+remoting/codec", - "+remoting/jingle_glue", "+remoting/protocol", + "+remoting/jingle_glue", "+third_party/jsoncpp", "+third_party/modp_b64", "+third_party/npapi", diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 39cd72d..c4572e2 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -15,7 +15,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/threading/platform_thread.h" #include "base/values.h" -#include "jingle/glue/xmpp_client_socket_factory.h" #include "net/base/net_util.h" #include "net/socket/client_socket_factory.h" #include "remoting/base/auth_token_util.h" @@ -332,12 +331,10 @@ void HostNPScriptObject::It2MeImpl::FinishConnect() { host_key_pair_ = RsaKeyPair::Generate(); // Create XMPP connection. - scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory( - new jingle_glue::XmppClientSocketFactory( - net::ClientSocketFactory::GetDefaultFactory(), net::SSLConfig(), - host_context_->url_request_context_getter(), false)); scoped_ptr<SignalStrategy> signal_strategy( - new XmppSignalStrategy(socket_factory.Pass(), xmpp_server_config_)); + new XmppSignalStrategy(net::ClientSocketFactory::GetDefaultFactory(), + host_context_->url_request_context_getter(), + xmpp_server_config_)); // Request registration of the host for support. scoped_ptr<RegisterSupportHostRequest> register_request( diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index e1ba452..9ed3383 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -27,7 +27,6 @@ #include "ipc/ipc_channel.h" #include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_listener.h" -#include "jingle/glue/xmpp_client_socket_factory.h" #include "media/base/media.h" #include "net/base/network_change_notifier.h" #include "net/socket/client_socket_factory.h" @@ -966,12 +965,9 @@ void HostProcess::StartHost() { state_ == HOST_STOPPED) << state_; state_ = HOST_STARTED; - scoped_ptr<jingle_glue::ResolvingClientSocketFactory> socket_factory( - new jingle_glue::XmppClientSocketFactory( - net::ClientSocketFactory::GetDefaultFactory(), net::SSLConfig(), - context_->url_request_context_getter(), false)); signal_strategy_.reset( - new XmppSignalStrategy(socket_factory.Pass(), + new XmppSignalStrategy(net::ClientSocketFactory::GetDefaultFactory(), + context_->url_request_context_getter(), xmpp_server_config_)); scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker( 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_; |